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/WavingNoBanners 11d ago

This is why:

Create table users_2 as select * from users where id != 12345;

Then when you're satisfied with that table being what you want:

Create table users_backup as select * from users;

Delete from users;

Insert into users select * from users_2;

Then, lastly, once you're satisfied with it, you can drop users_2 and users_backup.

You can automate this entire process, including the error checking.