SQL DELETE Statement

Friday, October 28, 2011

tags SQL

The DELETE statement is used to delete rows in a table. The WHERE clause should always be used in conjunction with the DELETE statement. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records in the table will be deleted.


DELETE FROM table_name
WHERE some_column=some_value


1000John Smith
1001Fred White
1002Jane Scott
1003Samuel Williams

DELETE FROM tbl_employees
WHERE employeeID=1000

Deleting All Rows

It is possible to delete all rows in a table without deleting the table itself.

DELETE FROM table_name


DELETE * FROM table_name

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.

Recommended Books & Training Resources

Head First SQL: Your Brain on SQL A Learners Guide SQL Cookbook