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
DELETE FROM <table> WHERE <idxfield> <= (SELECT MAX(<idxfield>) FROM (SELECT TOP 1000 <idxfield> FROM <table>) x )
Example
DELETE FROM customer
WHERE 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 |