触发器点滴

判断操作类型

if exists (select 1 from inserted) and exists (select 1 from deleted)
begin
   
-- update
end

if
exists (select 1 from inserted) and not exists (select 1 from deleted)
begin
   
--insert
end

posted on 2011-04-19 12:05  天空一角  阅读(409)  评论(0编辑  收藏  举报