this post was submitted on 16 Nov 2023
266 points (97.5% liked)

Very Real Tech Pics

1404 readers
1 users here now

There's no place like 127.0.0.1

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] TheSlad@sh.itjust.works 17 points 2 years ago (2 children)

Where clauses should be syntactically required for delete or update statements. Throw an error without them. If you really want to hit every record in the table then throw a WHERE true in there just to be explicit.

Its such a common mistake i dont get why this isnt a thing.

[โ€“] GBU_28@lemm.ee 6 points 2 years ago

Good idea.

Easy enough to slap a where 1=1; on there if you want to burn the place down