Comment on I accidentally removed the WHERE clause from my SQL query in a personal tool. Every row is now the same. I lost everything, have no backup, and I'm stupid.

<- View Parent
elvith@feddit.de ⁨8⁩ ⁨months⁩ ago

Yes, but

  1. Begin transaction
  2. Update table set x='oopsie’
  3. Sees 42096 rows affected
  4. Rollback

Can prevent a restore, whereas doing the update with auto commit guarantees a restore on (mostly) every error you make

source
Sort:hotnewtop