日期:2014-05-17 浏览次数:20570 次
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