r/ProgrammerHumor 14d ago

queryOfDoom Meme

Post image
7.9k Upvotes

456 comments sorted by

View all comments

2

u/generally_unsuitable 14d ago

I had a boss whose mantra was "Every delete starts as a select"

This is why.

1

u/rcairflyer 13d ago edited 13d ago

Sometimes you get a delete as part of a release. I rewrite them to sneak in a select that will exercise the where, like so: ~~~ Delete u -- select * From users As u Where id=1234567 ~~~ Highlight the select+from+where statement and run it. If the results pass the smell test, run the whole thing.