同一张表上的insert、update触发器能合并吗,如果可以,怎么合并?
如题
create trigger tr_insert_BOMMC
on BOMMC
after insert
as
set xact_abort on
insert BF_DATA..BOMMC(
MC001,
MC002,
MC003,
MC004
)
select * from inserted
go
create trigger tr_update_BOMMD
on BOMMD
after update
as
update BF_DATA..BOMMD
set
MD001=A.MD001,
MD002=A.MD002,
MD003=A.MD003,
MD004=A.MD004
from BF_DATA..BOMMD as B,
inserted as A where B.MD001=A.MD001 and B.MD002=A.MD002