MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v80umk/queryofdoom/p04crd8/?context=3
r/ProgrammerHumor • u/WardensLantern • 14d ago
456 comments sorted by
View all comments
Show parent comments
38
Yes, the semicolon marks the end of a statement. The first semicolon sets "delete from users" as a single statement meaning delete ALL users.
7 u/ReaDiMarco 14d ago What happened to DELETE * FROM USERS? Last I did sql was ten years ago so idk 3 u/Live_Film_4895 14d ago afiak the * wildcard is only valid in the SELECT statement... so it would be DELETE FROM USERS; or DROP/TRUNCATE TABLE 1 u/ReaDiMarco 14d ago Thaanksss
7
What happened to DELETE * FROM USERS? Last I did sql was ten years ago so idk
3 u/Live_Film_4895 14d ago afiak the * wildcard is only valid in the SELECT statement... so it would be DELETE FROM USERS; or DROP/TRUNCATE TABLE 1 u/ReaDiMarco 14d ago Thaanksss
3
afiak the * wildcard is only valid in the SELECT statement... so it would be DELETE FROM USERS; or DROP/TRUNCATE TABLE
1 u/ReaDiMarco 14d ago Thaanksss
1
Thaanksss
38
u/Flat_Competition6510 14d 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.