> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ocient.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ocient.ferndocs.com/_mcp/server.

# Remove Records from an Ocient System

> Discover methods for safely and efficiently removing records from an Ocient system, ensuring data integrity.

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.

> **Warning**
>
> All options for removing data are destructive and cannot be undone after execution. Therefore, be cautious when removing any Ocient records from your database.

## 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**](/guides/sql-reference/data-control-language-dcl-statement-reference).

## Remove Records Using DELETE

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

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.

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

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

For details about the `DELETE` statement, see [**DELETE FROM TABLE**](/guides/sql-reference/data-definition-language-ddl-statement-reference/tables).

### 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.

```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.

> **Note**
>
> 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:

* `point_table` contains a column of geospatial point values.
* `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**](/guides/sql-reference/geospatial-functions/spatial-relationships) 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'`.

```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.

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

## Related Links

[**Key Concepts**](/guides/get-started-with-the-ocient-hyperscale-data-warehouse/key-concepts)

[**Ingest Data with Legacy LAT Reference**](/guides/lat-reference/ingest-data-with-legacy-lat-reference)

[**Query Ocient**](/guides/query-ocient)