CREATE TRIGGER a1_a ON [dbo].[a1]
FOR INSERT
AS
insert into b.dbo.b1(g,h,j)
select c as g,d as h,e as j from inserted
在A数据库A1表,加上面的触发器(只限于同一台服务器不通数据库数据转存),如果要在不同的服务器上,就先在A所在服务器上加链接服务器,触发器修改为:
CREATE TRIGGER a1_a ON [dbo].[a1]
FOR INSERT
AS
insert into [server name].b.dbo.b1(g,h,j)
select c as g,d as h,e as j from inserted
温馨提示:答案为网友推荐,仅供参考