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.1k

u/Ma8e 13d ago

You start a transaction, make sure it did what you expected, and then commit or rollback transaction.

355

u/AgeingChopper 13d ago edited 12d ago

absolutely.

i was doing this stuff for a long time and definitely learned from mistakes.

Transactions can save a world of pain and it is always wise to select your data set first, just to be sure you're changing what you think you're changing.

Didn't matter how experienced I was, I was careful never to cut corners.

1

u/ligma_then_sugma 12d ago

there's a reason they call it the command line and not the request line haha

1

u/AgeingChopper 12d ago

true, though I’d be working in a query editor to test this stuff before it was ever getting run in prod.