SQL DELETE Statement
This is very common mistake done by database users that they forget to include WHERE condition and all records gets deleted. So while running DELETE command make sure that you are specifying WHERE condition if you want to delete specific records. Also if you want to delete all records from a table then use TRUNCATE TABLE rather than using DELETE command as TRUNCATE table is faster than DELETE and uses lesser resources.
DELETE FROM TableName
In this tutorial, we will use Student table to delete some records.
We will try to delete record number 16 from Student table where RollNumber is 8888.
DELETE FROM Student WHERE RollNumber = 8888
This query will drop one record from Student table. If you want to delete all records from the table then you can use below query.
DELETE FROM Student
Reference: Manzoor Siddiqui [www.SQLServerLog.com]