Find the DELETE Mistake
Find the Mistake Easy
Question
This DELETE is dangerous. Find the mistake:
Code
DELETE FROM orders;
Hint
What happens without a WHERE clause on DELETE?
Explanation
This DELETE has no WHERE clause, so it deletes ALL rows from the orders table. The fix is to add a WHERE clause like WHERE id = 123 to delete only the intended row(s).
Related Resources
Related Lessons
- Insert, Update, Delete
Learn DELETE safety.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.