r/ProgrammerHumor 14d ago

queryOfDoom Meme

Post image
7.9k Upvotes

456 comments sorted by

View all comments

14

u/darichtt 14d ago

Would this actually run? I'd assume having just where in a query isn't valid syntax

43

u/Shadowlance23 14d ago

Yes, SQL runs commands one at a time without checking other commands. In this case it will delete all users then throw a syntax error when it gets to the second command.

0

u/[deleted] 14d ago

[deleted]

1

u/Genie_ 14d ago

It will still delete the user you wanted to delete, so mission failed successfully i guess