Home »
SQL
SQL - DELETE Statement (to delete records/table)
SQL - DELETE command: Learn about the DELETE command, its syntax examples etc with queries.
Submitted by Shubham Singh Rajawat, on September 17, 2017
DELETE statement is use to delete a record from the table or delete the whole table.
DELETE is a Data Manipulation Language (DML) command which means it only works on the data not on the structure i.e. if the data of the whole table is delete even then the table exists means its structure does not get deleted.
Syntax:
DELETE FROM table_name WHERE condition;
Here,
table_name: name of the table.
condition: condition according to which a particular record is selected.
Queries
1. Delete all the records from the table
DELETE FROM Student;
Above statement will delete all the data/records/student from the table Student.
2. Delete multiple records from the table
For example: If we want to delete all the students who live in the City Gwalior then the following statement will be used
DELETE FROM Student WHERE City='Gwalior';