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.

Blackmist@feddit.uk ⁨1⁩ ⁨year⁩ ago

You’re not the first. You won’t be the last. I’m just glad my DB of choice uses transactions by default, so I can see “rows updated: 3,258,123” and back the fuck out of it.

I genuinely believe that UPDATE and DELETE without a WHERE clause should be considered a syntax error. If you want to do all rows for some reason, it should have been something like UPDATE table SET field=value ALL.

source
Sort:hotnewtop