Last updated

SQL DELETE

Definition: DELETE removes rows from a table. Like UPDATE, it should almost always include a WHERE clause to target specific rows.

Example 1 — delete by condition

DELETE FROM Customers
WHERE Country = 'Mexico';

Example 2 — delete and see what remains

DELETE FROM Customers
WHERE Country = 'Mexico';
SELECT * FROM Customers;

Example 3 — delete a single row

DELETE FROM Customers
WHERE CustomerID = 8;

⚠️ Danger: DELETE FROM Customers; with no WHERE empties the entire table. Always confirm your condition first.

💡 The sample database resets each Run, so deletions here are temporary — a safe place to practise.

Try it Yourself
Output

          
Ad · responsive