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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access