DELETE
The DELETE statement enables you to remove rows from tables. This statement specifies the table from which rows are to be deleted and criteria for the rows to deleted. Table 21.8 describes the components of a DELETE statement
Component | Description |
---|---|
DELETE FROM | Specifies the table from which to delete rows |
WHERE | Specifies the criteria that determines which rows are to be deleted |
Using DELETE to Delete All Rows from a Table
To delete all rows from a table, you need only specify the name of the table from which to delete those rows. The following example shows how to delete all rows from the titles table:
DELETE FROM titles
NOTE
SQL Server offers another method for removing all rows from a table ...
Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition 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.