Databases · Junior · Question 32 of 75
What happens with UPDATE users SET active = false; without a WHERE?
- ✓Correct answer: Every row in the table is updated
- 2Nothing, because
WHEREis required - 3Only the first row is updated
Explanation
The same goes for DELETE FROM users;. Run risky changes inside a transaction, check the affected row count, and only then commit.