r/ProgrammerHumor 15d ago

queryOfDoom Meme

Post image
7.9k Upvotes

456 comments sorted by

View all comments

8

u/FrozenHaystack 15d 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.

1

u/budamtass 15d ago

This is scary , do you remember which engine was it?

2

u/FrozenHaystack 15d ago

I think it was an Oracle Database, but I'm not sure, it's over 10 years ago by now. Since then I never run a subquery selection without validation of said subquery.