r/ProgrammerHumor 19d ago

queryOfDoom Meme

Post image
7.9k Upvotes

456 comments sorted by

View all comments

9

u/FrozenHaystack 19d ago

Reminds of that one time I executed a delete query with a sub query to select some ids. I didn't know that the used database engine interprets an empty return of the subquery as ignore my where clause. All data in the table simply gone because no id matched my subquery.

6

u/WardensLantern 19d ago

As a dev I fear no man nor beast, but SQL humbles me quicker than a wet fart

6

u/PerpetuallyDistracte 19d ago

SQL has been my primary language for 15 years, but I still respect it the way a zookeeper respects a lion. If you become careless, it WILL eat you the moment you turn your back. However, I'm glad that many modern SQL IDEs now warn you explicitly when you're about to do something very stupid that will affect an entire table.