触发器 如何判断是 插入触发的,还是更新触发的
if exists (select 1 from inserted) and not exists (select 1 from deleted)
--insert
if exists (select 1 from inserted) and exists (select 1 from deleted)
--update
if not exists (select 1 from inserted) and exists (select 1 from deleted)
--delete