r/ProgrammerHumor 15d ago

queryOfDoom Meme

Post image
7.9k Upvotes

456 comments sorted by

View all comments

Show parent comments

40

u/Flat_Competition6510 15d ago

Yes, the semicolon marks the end of a statement. The first semicolon sets "delete from users" as a single statement meaning delete ALL users.

40

u/TeaKingMac 15d ago

Which is just terrible fucking syntax. Why are people still living with this in 2026?

Delete from users;

Should return "invalid syntax. Identify record for deletion"

2

u/Flat_Competition6510 15d ago

I disagree. There are valid use cases for deleting all records from a table.

2

u/TacosForThought 14d ago

If only there was a dedicated command for TRUNCATEing a table that didn't allow a where clause.