Hacker News new | ask | show | jobs
by famousactress 5332 days ago
If I were to re-imagine SQL I'd invert the sequence of the clause and statement for this very reason (FROM TABLE WHERE USERID="X" DELETE).

As it, when I'm writing sensitive SQL to fix an issue I end up writing the where clause first as a SELECT, then issue it.. check the results, history up, ctl-a and replace with a DELETE. Harrowing stuff.

1 comments

I put in a deliberate syntax error first, and then edit in the actual delete or update query. This protects me from hitting enter too early.