16 ms·
> 2) Always start UPDATE or DELETE queries by writing them as SELECT; On that point, I'd love a database or SQL spec extension that provided a 'dry-run' mode f
by dingaling 9y ago
> 2) Always start UPDATE or DELETE queries by writing them as SELECT;
On that point, I'd love a database or SQL spec extension that provided a 'dry-run' mode for UPDATE or DELETE and which would report how many rows would be impacted.
--
123338817 rows will be affected
Oooops made an error!
- carterehsmith 9y ago> I'd love a database or SQL spec extension that provided a 'dry-run' mode for UPDATE or DELETE and which would report how many rows would be impacted. I mean, if your DB supports transactions, you are in luck. Start a transaction (that may be different among vendors - BEGIN TRANSACTION or SET AUTOCOMMIT=0 etc) and run your stuff. If everything looks good, commit. If you get OOOps number of records, just rollback.