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.Documentation Index
Fetch the complete documentation index at: https://docs.ocient.com/llms.txt
Use this file to discover all available pages before exploring further.
Required Permissions
To remove data, a user must have theDELETE privilege for the specified table. For details on privileges, see the Data Control Language (DCL) Statement Reference.
Remove Records Using DELETE
TheDELETE 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.
Remove Data Using DELETE with a Filter
In this example, theDELETE statement removes all rows from the products table with a value less than 1 in the rating column.
SQL
Remove Data Using Joined Tables
You can useDELETE with a JOIN statement to help filter rows for removal based on a condition that applies to the second table.
The statement removes rows only from the first table and not the second joined table.
JOIN operation on the geospatial values in two tables:
point_tablecontains a column of geospatial point values.us_state_tablecontains columns of all abbreviated U.S. state names and polygon values representing their boundaries.
JOIN operation uses the ST_INTERSECTS 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

