How do I cancel a Delete in SQL

前端 未结 4 1781
暗喜
暗喜 2021-01-02 10:00

I want to create a trigger to check what is being deleted against business rules and then cancel the deletion if needed. Any ideas?

The solution used the Instead of

4条回答
  •  清歌不尽
    2021-01-02 10:24

    The trigger can roll back the current transaction, which will have the effect of cancelling the deletion. As the poster above also states, you can also use an instead of trigger.

提交回复
热议问题