表1的触发器
create TRIGGER Web_Insert on Web.dbo.表1
for Insert
as
if not exists(select sid from OA.dbo.表1 where sid =(select id from inserted) )
begin
insert into OA.dbo.表1
(sid,Name,corid,password,city,industry,link,fax,address,code,
tel,email,licen,time,memo,Flag,Submit)
select id,Name,corid,password,city,industry,link,fax,address,code,
tel,email,licen,time,memo,Flag,Submit from inserted
end
表2的触发器
create TRIGGER OA_Insert on OA.dbo.表1
for Insert
as
if not exists(select sid from Web.dbo.表1 where sid =(select id from inserted) )
begin
insert into Web.dbo.表1
(sid,Name,corid,password,city,industry,link,fax,address,code,
tel,email,licen,time,memo,Flag,Submit)
select id,Name,corid,password,city,industry,link,fax,address,code,
tel,email,licen,time,memo,Flag,Submit from inserted
end