判断操作类型
if exists (select 1 from inserted) and exists (select 1 from deleted)begin -- updateendif exists (select 1 from inserted) and not exists (select 1 from deleted)begin --insertend