表中的字段有些是自增的,有些有默认值。

解决方案 »

  1.   

    insert into table1 select a,b,c from table2  注意字段类型一致
      

  2.   

    for i := 1 to n
      insert into table1 select a,b,c from table2  注意字段类型一致
      

  3.   

    declare @i int
    set @i=10
    while (@i<>0)
         begin
           insert into TableName1 select * from TableName1
           set @i=@i-1
         end
    //--------------------------------------
    此方法仅适用于:
    SQL server Query Analyzer
      

  4.   

    adoquery1.close;
    adoquery1.sql.clear;
    adoquery1.sql.add('insert mytable select * from mytable');
    for i=1 to 10
      adoquery.execsql;