1-- Intended: reset only expired trial accounts
2BEGIN;
3
4UPDATE accounts
5SET status = 'EXPIRED', updated_at = NOW()
6;
7
8-- 500,000 rows updated instead of 23
9COMMIT;
no lines flagged
#023PracticeEasy8 min · 50 XP
UPDATE Without WHERE Wipes Table
A maintenance script to reset trial users accidentally updates every row in production. Find the missing constraint.
Flagged linesNo lines flagged yet
What's wrong?
Flag a line or write a note to submit.