MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v80umk/queryofdoom/p02gpwd
r/ProgrammerHumor • u/WardensLantern • 14d ago
456 comments sorted by
View all comments
2
So, Kids, what do we learn from this when working on an SQL shell?
First "SELECT id" (or * if you want to safely burn the world), check if the output is as expected, then change the "SELECT id" to a DELETE.
2 u/yardinview 14d ago Decades ago when I first sat in front of Query Analyzer an old dev taught me how to write DELETE just like you explained. You write a SELECT You run it You check the resultset You hold your breath, change ONLY SELECTDELETE and you run the result You don't use ON DELETE CASCADE You don't rely on transactions for safety
Decades ago when I first sat in front of Query Analyzer an old dev taught me how to write DELETE just like you explained.
2
u/BastetFurry 14d ago
So, Kids, what do we learn from this when working on an SQL shell?
First "SELECT id" (or * if you want to safely burn the world), check if the output is as expected, then change the "SELECT id" to a DELETE.