DELETE
DELETE FROM removes the rows that match WHERE. Without WHERE every row is removed (the table stays). To remove a table itself, use DROP TABLE.
Example
DELETE FROM students
WHERE name = 'Esi';Result
1 row affected
Example
DELETE FROM enrolments
WHERE course_id = 4;Result
3 rows affected
Exercise
Remove rows from a table.
FROM students WHERE id = 8;Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.