|
|
|
|
|
by justinclift
1063 days ago
|
|
At a previous place I worked, if they were working on the cli (eg in psql or similar) they'd always use these two steps, either of which would provide adequate protection: 1. Start a transaction before even thinking of writing the delete/update/etc (BEGIN; ...) 2. Always write the WHERE query out first, THEN go back to the start of the line and fill out the DELETE/UPDATE/etc. It worked well, and it's a habit I've since tried to keep on doing myself as well. |
|