日期:2014-05-18 浏览次数:20564 次
insert into B select row_number() over(order by getdate()),* from (select Uname,Uage from A union all select NAME,AGE from A) t
------解决方案--------------------
B表中Uid 是自增列么?如果是的可以 insert into b(uname,uage) select name,age from a
------解决方案--------------------
insert into b select column1,column2,column2 from a;---向现有数据结构表中添加数据
select * into new_tablename from old_tablename---复制一个现有表结构并将其数据追加到新表结构中
------解决方案--------------------
insert into b(uname,uage) select name,age from a