如:insert into Table (col1,col2...)
select col1,col2... from TAble1

解决方案 »

  1.   

    insert into table1 select * from table2
      

  2.   

    declare table @ta(a int,b int c int)
    insert into @ta(1,1) --这是往表@ta中插入一条纪录
    insert into @ta(1,2)declare table @tb(d int,e int)
    insert into @tb(d,e) select a,b from @ta 
    --这是往表@tb中插入多条纪录
    --先将表@ta中的多条纪录选择出来(select a,b from @ta) 
    --然后插入@tb中对应的字段,必须保证插入的字段列数相等,类型匹配
      

  3.   

    多插几次,或者用union all先合并待插入的数据。不知你的数据是怎么来的,所以不知道用什么语句。