Deleting Rows with DELETE
The DELETE statement removes rows from a table. You can use DELETE to remove:
All rows in a table
Specific rows in a table
To delete rows, you specify:
The table whose rows to delete
An optional search condition that specifies which rows to delete
The important characteristics of DELETE are:
Unlike INSERT and UPDATE, DELETE takes no column names because it removes entire rows.
DELETE removes rows from a table, but it never deletes the table’s definition. Even if you remove all rows from a table, the table itself still exists. If you want to delete a table definition (and all its associated data, indexes, and so on), see “Dropping a Table with DROP TABLE” in Chapter 10.
DELETE takes an optional WHERE clause that specifies ...
Get SQL: Visual QuickStart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.