SQL Server : Rollback without BEGIN TRANSACTION

前端 未结 3 794
迷失自我
迷失自我 2021-01-13 01:25

Is there a way we can rollback to previous state of the transaction using ROLLBACK without BEGIN TRANSACTION?

delete from table1;
ROLLBACK
         


        
3条回答
  •  逝去的感伤
    2021-01-13 02:08

    You must have a BEGIN TRANSACTION before you can use the ROLLBACK command. You can't go back to the previous state.

提交回复
热议问题