--插入
if exists(select 1 from inserted) and not exists(select 1 form deleted)
--更新
if exists(select 1 from inserted) and exists(select 1 form deleted)
--删除
if not exists(select 1 from inserted) and exists(select 1 from deleted)
--插入
if exists(select 1 from inserted) and not exists(select 1 form deleted)
--更新
if exists(select 1 from inserted) and exists(select 1 form deleted)
--删除
if not exists(select 1 from inserted) and exists(select 1 from deleted)
转载于:https://my.oschina.net/ansenchina/blog/3021788