How to undo a SQL Server UPDATE query?

前端 未结 5 1798
旧巷少年郎
旧巷少年郎 2021-02-03 21:22

In SQL Server Management Studio, I did the query below.
Unfortunately, I forgot to uncomment the WHERE clause.
1647 rows were updated instead of 4.

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-03 21:47

    Since you have a FULL backup, you can restore the backup to a different server as a database of the same name or to the same server with a different name.

    Then you can just review the contents pre-update and write a SQL script to do the update.

提交回复
热议问题