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

Very Real Tech Pics

1257 readers
1 users here now

There's no place like 127.0.0.1

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 17 points 1 year 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.

[โ€“] [email protected] 6 points 1 year ago

Good idea.

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