English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The DELETE command is used to delete existing records from the table.
The following SQL statement deletes customer 'Alfreds Futterkiste' from the 'Customers' table:
DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';
Note:Be careful when deleting records from a table! Note the WHERE clause in the DELETE statement. The WHERE clause specifies the records to be deleted. If the WHERE clause is omitted, all records in the table will be deleted!
You can delete all rows from a table without deleting the table. This means that the table structure, properties, and indexes will remain unchanged:
The following SQL statement deletes all rows from the 'Customers' table without deleting the table. This means that the table structure, properties, and indexes will remain unchanged:
DELETE FROM Customers;