How can I rollback an UPDATE query in SQL server 2005?

后端 未结 10 2416
北海茫月
北海茫月 2020-12-14 09:15

How can I rollback an UPDATE query in SQL server 2005?

I need to do this in SQL, not through code.

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 09:32

    You can rollback the statements you've executed within a transaction. Instead of commiting the transaction, rollback the transaction.

    If you have updated something and want to rollback those updates, and you haven't done this inside a (not-yet-commited) transaction, then I think it's though luck ...

    (Manually repair, or, restore backups)

提交回复
热议问题