this post was submitted on 16 Nov 2023
259 points (97.4% liked)

Very Real Tech Pics

1287 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] 16 points 11 months 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] 5 points 11 months ago

Good idea.

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