DELETE Statement
Removes rows from a table that meet the WHERE condition, or removes all rows if no WHERE clause is specified.
Syntax
DELETE FROM table-name {WHERE search-condition}
Syntax Elements
table-name =
{owner-name.}table-identifier
| qualifier-name qualifier-separator base-table-identifier *| qualifier-name qualifier-separator{owner-name.}base-table-identifier *
owner-name
The SQL user-id of the creator of the table
table-identifier
Any user-defined name (except a
Reserved Word) starting with a letter and comprising up to 49 letters,
underscores and/or numbers. Letters are case sensitive.
search-condition
Refer to the topic
SQL Search Condition.
Restrictions
The user performing this statement requires SQL DELETE privileges.
Comments
If no WHERE clause is included then all the table data is deleted (this is similar to the TCL command CLEAR-FILE).
Examples
DELETE FROM EMP
Clears the EMP table.
DELETE FROM EMP WHERE DEPTNO = 90020
Deletes entries for all employees in department 90020.