create trigger T_update on t after update as if not update(col1) return if not exists(select 1 from deleted d join inserted i on d.ID=i.ID)--ID用唯一 return ---觸發
create trigger T_update on t after update as if not update(col1)--沒有更新col1返回 return if not exists(select 1 from deleted d join inserted i on d.ID=i.ID and d.col1=1 and i.col1=2)--ID用唯一,不是由1变成2的时候返回 return ---觸發
after update
as
if not update(col1)
return
if not exists(select 1 from deleted d join inserted i on d.ID=i.ID)--ID用唯一
return
---觸發
create trigger T_update on t
after update
as
if not update(col1)--沒有更新col1返回
return
if not exists(select 1 from deleted d join inserted i on d.ID=i.ID and d.col1=1 and i.col1=2)--ID用唯一,不是由1变成2的时候返回
return
---觸發