Tsallaka zuwa abun ciki
Justice Tech School

DELETE Safely

DELETE removes rows. Preview with SELECT, then delete with the same WHERE.

Example
DELETE FROM enrolments WHERE course_id = 1;
SELECT COUNT(*) AS left_rows FROM enrolments;

Result

left_rows
6

Exercise

Remove rows.

 FROM t WHERE id = 1

Quiz Test

Which removes rows but keeps the table?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.