判断操作类型

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

 

判断操作类型

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

相关文章:

  • 2022-02-21
  • 2021-12-09
  • 2021-10-25
  • 2022-02-15
  • 2021-07-20
  • 2021-06-25
  • 2021-09-15
猜你喜欢
  • 2021-06-27
  • 2022-12-23
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
相关资源
相似解决方案