Delete rows safely
Same rule as UPDATE: test the WHERE with SELECT, then switch to DELETE.
SQL · Delete rows safelyBeginner
SELECT * FROM orders WHERE status = 'cancelled';
DELETE FROM orders
WHERE status = 'cancelled';deletewheresafety
Same rule as UPDATE: test the WHERE with SELECT, then switch to DELETE.
SELECT * FROM orders WHERE status = 'cancelled';
DELETE FROM orders
WHERE status = 'cancelled';