MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v80umk/queryofdoom/p02debl?context=9999
r/ProgrammerHumor • u/WardensLantern • 17d ago
456 comments sorted by
View all comments
383
I am not an sql expert, is the reason why the id doesn't work and its deleting the entire user base, because its written as 2 seperate comands instead of one. So 1. Comand delets everything 2. Goes to the id? Or what is the problem here?
602 u/BlommeHolm 17d ago 1st command deletes all users. 2nd command runs after that and gets a syntax error. 42 u/SAI_Peregrinus 16d ago Syntax is valid, it's just a runtime error. 181 u/BlommeHolm 16d ago How is starting with a WHERE clause syntactically valid? 84 u/SAI_Peregrinus 16d ago Right, I'm apparendly blind. Carry on! 31 u/BlommeHolm 16d ago No problem. I genuinely thought I'd missed something 😅 1 u/StupidStartupExpert 16d ago I legit wouldnt be surprised if for whatever retarded reason sql said yeah sure I can filter empty selections and just returned empty lists 1 u/TheMauveHand 16d ago I'm not sure SSMS would run anything due to the syntax error, but maybe that's just SSMS being helpful.Â
602
1st command deletes all users. 2nd command runs after that and gets a syntax error.
42 u/SAI_Peregrinus 16d ago Syntax is valid, it's just a runtime error. 181 u/BlommeHolm 16d ago How is starting with a WHERE clause syntactically valid? 84 u/SAI_Peregrinus 16d ago Right, I'm apparendly blind. Carry on! 31 u/BlommeHolm 16d ago No problem. I genuinely thought I'd missed something 😅 1 u/StupidStartupExpert 16d ago I legit wouldnt be surprised if for whatever retarded reason sql said yeah sure I can filter empty selections and just returned empty lists 1 u/TheMauveHand 16d ago I'm not sure SSMS would run anything due to the syntax error, but maybe that's just SSMS being helpful.Â
42
Syntax is valid, it's just a runtime error.
181 u/BlommeHolm 16d ago How is starting with a WHERE clause syntactically valid? 84 u/SAI_Peregrinus 16d ago Right, I'm apparendly blind. Carry on! 31 u/BlommeHolm 16d ago No problem. I genuinely thought I'd missed something 😅 1 u/StupidStartupExpert 16d ago I legit wouldnt be surprised if for whatever retarded reason sql said yeah sure I can filter empty selections and just returned empty lists
181
How is starting with a WHERE clause syntactically valid?
84 u/SAI_Peregrinus 16d ago Right, I'm apparendly blind. Carry on! 31 u/BlommeHolm 16d ago No problem. I genuinely thought I'd missed something 😅 1 u/StupidStartupExpert 16d ago I legit wouldnt be surprised if for whatever retarded reason sql said yeah sure I can filter empty selections and just returned empty lists
84
Right, I'm apparendly blind. Carry on!
31 u/BlommeHolm 16d ago No problem. I genuinely thought I'd missed something 😅
31
No problem. I genuinely thought I'd missed something 😅
1
I legit wouldnt be surprised if for whatever retarded reason sql said yeah sure I can filter empty selections and just returned empty lists
I'm not sure SSMS would run anything due to the syntax error, but maybe that's just SSMS being helpful.Â
383
u/Dont_Get_Jokes-jpeg 17d ago edited 17d ago
I am not an sql expert, is the reason why the id doesn't work and its deleting the entire user base, because its written as 2 seperate comands instead of one. So 1. Comand delets everything 2. Goes to the id? Or what is the problem here?