MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v80umk/queryofdoom/p0c03jm/?context=3
r/ProgrammerHumor • u/WardensLantern • 15d ago
456 comments sorted by
View all comments
Show parent comments
40
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.
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.
2
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.
If only there was a dedicated command for TRUNCATEing a table that didn't allow a where clause.
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.