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

后端 未结 10 2411
北海茫月
北海茫月 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:39

    As already stated there is nothing you can do except restore from a backup. At least now you will have learned to always wrap statements in a transaction to see what happens before you decide to commit. Also, if you don't have a backup of your database this will also teach you to make regular backups of your database.

    While we haven't been much help for your imediate problem...hopefully these answers will ensure you don't run into this problem again in the future.

提交回复
热议问题