sql 触发器 获取插入的记录 转存到另一个数据库的表

日期:2018-04-07 14:23:51 人气:1

sql 触发器 获取插入的记录 转存到另一个数据库的表

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
    A+
热门评论