The DELETE statement is used to delete the existing record/records in a table.
Syntax:
DELETE FROM table_name
WHERE condition;
DEMO DATABASE:
Roll_NO | Name | Total_Marks | Phone_Number |
1 | Arun | 84 | 12345 |
2 | Rahul | 68 | 2147483647 |
Example: To delete the record of Roll_No 2.
DELETE FROM students
WHERE Roll_No = 2;
The below is the record after deleting Roll_No 2’s record:
Roll_NO | Name | Total_Marks | Phone_Number |
1 | Arun | 84 | 12345 |