SQL Bug Hunt Easy +10 XP
UPDATE Without WHERE
This UPDATE is dangerous. What's wrong?
SQLFind the bug
1
UPDATE employees2
SET salary = 50000; The bug is on line 2
Select the correct fix
Show answer and explanation
Answer: Add a WHERE clause to target specific rows
Without WHERE, UPDATE modifies every row in the table. Always specify which rows to update.
Hint: Which clause filters which rows are affected?
What this challenge tests
Bug Hunt in SQL: update, where.