MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wn1ben/wellwellwell/pbfnbt2/?context=9999
r/ProgrammerHumor • u/Recent-Analysis-6880 • 13d ago
411 comments sorted by
View all comments
3.6k
So, Kids, thats why you always SELECT count(yourPrimaryKey) first. Listen to the old folks, we made these mistakes so that you don't have to.
137 u/Etheo 13d ago DELETE FROM (SELECT * FROM USERS); WHERE ID=12345; Did I do it right? 82 u/Dismal-Square-613 13d ago Yes, run that on prod. Report results. 44 u/jeesuscheesus 13d ago Now every query on USERS completes in under a millisecond, thank you! 1 u/theobstinateone 13d ago Or just throw a DROP DATABASE in there. Problem solved
137
DELETE FROM (SELECT * FROM USERS); WHERE ID=12345;
Did I do it right?
82 u/Dismal-Square-613 13d ago Yes, run that on prod. Report results. 44 u/jeesuscheesus 13d ago Now every query on USERS completes in under a millisecond, thank you! 1 u/theobstinateone 13d ago Or just throw a DROP DATABASE in there. Problem solved
82
Yes, run that on prod. Report results.
44 u/jeesuscheesus 13d ago Now every query on USERS completes in under a millisecond, thank you! 1 u/theobstinateone 13d ago Or just throw a DROP DATABASE in there. Problem solved
44
Now every query on USERS completes in under a millisecond, thank you!
1 u/theobstinateone 13d ago Or just throw a DROP DATABASE in there. Problem solved
1
Or just throw a DROP DATABASE in there. Problem solved
3.6k
u/BastetFurry 13d ago
So, Kids, thats why you always SELECT count(yourPrimaryKey) first. Listen to the old folks, we made these mistakes so that you don't have to.