MSDN Documentation

DELETE Statement

The DELETE statement removes rows from a table or view. It can be used with a WHERE clause to specify which rows to delete, or without a WHERE clause to delete all rows.

Syntax

DELETE [TOP (expression)] 
FROM table_expression 
[WHERE ]
[;]

Parameters

Examples

Delete all rows from a table

DELETE FROM Employees;

Delete rows with a condition

DELETE FROM Employees
WHERE HireDate < '2000-01-01';

Delete the top 10 oldest records

DELETE TOP (10) FROM Orders
WHERE OrderDate < '2015-01-01'
ORDER BY OrderDate ASC;

Remarks

See Also