2.13 DELETE
Description
Deletes zero, one or more rows from the specified table that satisfy the search condition specified in the WHERE clause. If the optional WHERE clause is not specified, then the DELETE statement deletes all rows of the specified table.
Syntax
DELETE FROM [owner_name.] { table_name | view_name }[ WHERE search_condition ];Notes
- If the table has primary/candidate keys, and if there exists references from other tables to the rows to be deleted, the statement is rejected.
- Deletion of data in linked tables is supported. However, the usage of the query expression in the search condition of the DELETE statement is not supported. Deletes to local views with CHECK option return error as the feature is not supported.
Example
DELETE FROM customerWHERE customer_name = 'RALPH' ;Authorization
The user executing this statement must have any of the following privileges:
If the target is a view, then the DELETE privilege is required on the target base table referred to in the view definition.
SQL Compliance SQL-92, ODBC Extended SQL grammar Environment Embedded SQL, interactive SQL, ODBC applications Related Statements Search Conditions
|
FairCom Corporation www.faircom.com |