How to Delete Rows in MySQL
Last updated July 24, 2026 · By the SaturnSQL team
Use DELETE FROM ... WHERE to remove matching rows. Without WHERE it deletes everything, so run the same condition as a SELECT first. TRUNCATE is faster when you really want the whole table empty.
DELETE FROM orders WHERE status = 'cancelled';Preview before deleting
SELECT COUNT(*) FROM orders WHERE status = 'cancelled';Delete with a join
DELETE o FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE c.is_test_account = 1;Huge deletes lock and bloat the binlog; delete in batches with LIMIT (e.g. LIMIT 10000 in a loop) on large tables.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free