编写触发器:
代码如下 | 复制代码 |
create trigger BlogDelet on Blog instead of delete as delete from Comment where CommentBlog in (select Id from deleted) |
创建一个Update触发器:
代码如下 | 复制代码 |
Create Trigger truStudent Update BorrowRecord end |
更多详细的关于sql触发器可参考http://www.111com.net/database/mssqlserver/39336.htm