---
title: Remove Records from an Ocient System
slug: JbPW-_B5GCufoVHhoygwV
description: Discover methods for safely and efficiently removing records from an Ocient system, ensuring data integrity.
docTags: 
createdAt: Wed Sep 13 2023 20:48:48 GMT+0000 (Coordinated Universal Time)
updatedAt: Mon Mar 30 2026 18:52:40 GMT+0000 (Coordinated Universal Time)
---

Ocient® supports multiple options for removing records from a database. Here, you can find the different methods for removing data along with their advantages and drawbacks to help you determine the method that best fits your needs.&#x20;

:::hint{type="danger"}
All options for removing data are destructive and cannot be undone after execution. Therefore, be cautious when removing any Ocient records from your database. &#x20;
:::

## Required Permissions

To remove data, a user must have the `DELETE` privilege for the specified table. For details on privileges, see the [Data Control Language (DCL) Statement Reference](<././SQL Reference/Data Control Language _DCL_ Statement Reference.md>).&#x20;

## Remove Records Using DELETE

The `DELETE` SQL statement removes specific individual rows from a table based on the `WHERE` filter clause.&#x20;

Unlike `TRUNCATE`, the `DELETE` statement does not restore the disk space of deleted rows without further system operations. In general, `DELETE` is a good option when removing small row sets, not entire tables.&#x20;

If a `DELETE` statement has no `WHERE` filter, it removes all rows in the table.&#x20;

The `DELETE` statement can support concurrent operations to remove rows on the same table, which might impact performance.&#x20;

For details about the `DELETE` statement, see [DELETE FROM TABLE](<././SQL Reference/Data Definition Language _DDL_ Statement Reference/Tables.md>).&#x20;

### Remove Data Using DELETE with a Filter

In this example, the `DELETE` statement removes all rows from the `products` table with a value less than 1 in the `rating` column.&#x20;

```sql
DELETE FROM products WHERE rating < 1; 
```

### Remove Data Using Joined Tables

You can use `DELETE` with a `JOIN` statement to help filter rows for removal based on a condition that applies to the second table.&#x20;

:::hint{type="info"}
The statement removes rows only from the first table and not the second joined table.
:::

This example deletes rows after performing a `JOIN` operation on the geospatial values in two tables:&#x20;

- `point_table` contains a column of geospatial point values.&#x20;
- `us_state_table` contains columns of all abbreviated U.S. state names and polygon values representing their boundaries.

The `JOIN` operation uses the [ST\_INTERSECTS](<././SQL Reference/Geospatial Functions/Spatial Relationships.md>) function to evaluate if each point value in `point_table` is contained within any of the polygon values in the `us_state_table`.

The example deletes any rows in `point_table` that are within the boundaries of Texas, abbreviated as `'TX'`. &#x20;

```sql
DELETE FROM point_table p
    JOIN us_state_table s ON ST_INTERSECTS(s.polygon_wkt, p.point_wkt)
WHERE s.state LIKE 'TX';
```

## Data Durability Considerations

To remove data, the data must be queryable in the system. For example, streaming data systems might experience a delay before rows can be deleted while they are in progress of the loading process to become fully durable. &#x20;

In most cases, data should be loaded and queryable within a matter of seconds.

## Related Links

[Key Concepts](<././Get Started with the Ocient Data Intelligence Platform/Key Concepts.md>)

[Ingest Data with Legacy LAT Reference](<././LAT Reference/Ingest Data with Legacy LAT Reference.md>)

[Query Ocient](<././Query Ocient.md>)
