6 ms·
That's awesome, My worst DELETE fail however was: DELETE * FROM table WHERE [long condition that resolves to true for all records] Now i write SELECT or
by amichal 10y ago
That's awesome,
My worst DELETE fail however was:
DELETE * FROM table WHERE [long condition that resolves to true for all records]
Now i write
SELECT or SELECT COUNT(*) over and over again until i see the data i expect and then change it to a DELETE/UPDATE.
It's not my personal habit but some folks I know turn off auto commit and BEGIN a transaction every time they enter an interactive SQL sessions. They then default to ROLLBACK at least once before COMMITing them.
That and having a user with read-only permissions or a read replica