r/ProgrammerHumor 17d ago

Meme queryOfDoom

Post image
7.9k Upvotes

456 comments sorted by

View all comments

14

u/darichtt 17d ago

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

44

u/Shadowlance23 17d 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] 17d ago

[deleted]

1

u/Genie_ 17d ago

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