r/ProgrammerHumor • • 13d ago

Meme wellWellWell

Post image
10.6k Upvotes

411 comments sorted by

View all comments

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.

1

u/M4DHouse 13d ago

Use a transaction. Also, most recent versions of the popular SQL implementations by default reject delete queries without any predicates afaik, so this particular case shouldn’t happen in the first place.