Jambone@lemmy.worldtoProgramming@programming.dev•I accidentally removed the WHERE clause from my SQL query in a personal tool. Every row is now the same. I overwrote 206,000+ rows. I have no backup, I am stupid.
12·
1 year agoIn MSSQL, you can do a BEGIN TRAN before your UPDATE statement.
Then if the number of affected rows is not about what you’d expect, doing a ROLLBACK would undo the changes.
If the number of affected rows did look about right, doing a COMMIT would make the changes permanent.
That post title brings back memories:
It was 1981 and my mom was having a hard time getting over the passing of my dad. So for a while, I occasionally took her to the movies.
One Saturday, I took her to see “Heavy Metal”.
She watched attentively with nary a comment.
Afterwards, I expected her to say something about it, given its mature content.
And, as we were passing through the lobby, she did:
“That was a cartoon.”