How do I cancel a Delete in SQL

前端 未结 4 1668
暗喜
暗喜 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

    Use an INSTEAD OF DELETE (see MSDN) trigger and decide within the trigger what you really want to do.

提交回复
热议问题