日期:2014-05-18  浏览次数:20391 次

同步表中数据的问题。。。
两个表A,B 
A中有数据列名为id(自增减的)a,b,c
B中有数据列名为id(自增减的)a,x,y
怎样实现A表中的数据在增加的时候,B表中的a同时自动增加呢?


------解决方案--------------------
create trigger ins on a
for insert
as
insert into b (a,x,y) select a,b,c from inserted
go