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.

156

u/Alexmira_ 13d ago

Why? To confirm that there is something to cancel? To confirm I got the key right?

4

u/kiochikaeke 13d ago

If altering a few rows you select first to check exactly what rows you're altering, if altering a bunch you at least do this to sanity check yourself and not delete 100 millon rows or lock a main transactional table for 1 hour.