Was this helpful?
DELETE
Valid in: SQL, ESQL
The DELETE statement deletes rows from the specified table that satisfy the search_condition in the WHERE clause. If the WHERE clause is omitted, the statement deletes all rows in the table. The result is a valid but empty table.
If the WHERE clause includes a subselect, the tables specified in the subselect cannot include the table from which you are deleting rows.
The DELETE statement has the following formats:
Interactive version:
[EXEC SQL] DELETE FROM table_name
              [WHERE search_condition];
Embedded non-cursor version:
[EXEC SQL] [REPEATED] DELETE FROM table_name
              [WHERE search_condition];
Embedded cursor version:
[EXEC SQL] DELETE FROM table_name
              WHERE CURRENT OF cursor_name;
table_name
Specifies the table for which the constraint is defined.
Last modified date: 08/28/2024