DELETE query is used to delete records from the table.
For this command, the given table will be taken as an example.
Table: users
| id | first_name | last_name | |
| 1 | Ram | Singh | ram@gmail.com |
| 2 | Krishna | Singh | krishna@gmail.com |
| 3 | Ajay | Singh | ajay@gmail.com |
Delete all records
DELETE FROM users;
Table: users
| id | first_name | last_name |
Delete specific records
DELETE FROM users WHERE id=2;
Table: users
| id | first_name | last_name | |
| 1 | Ram | Singh | ram@gmail.com |
| 3 | Ajay | Singh | ajay@gmail.com |