insert tablename
select * from tablename               --1insert tablename
select * from tablename               --2insert tablename
select * from tablename               --4insert tablename
select top 2 * from tablename               --2

解决方案 »

  1.   

    Declare @n int
    set @n=1
    while @n<5   --完成添加 2的4次方过相同记录
     begin
       Insert tablename
       Select * from tablename     set @n=@n+1
     end
      

  2.   

    declare @aa int
    select @aa=9
    while @aa
    begin
    insert into tablename select top 1 * from tablename
    select @aa=@aa-1
    end
    不过要注意主键的问题
      

  3.   

    insert tablename
    select top 29 a.* from tablename a,sysobjects,sysobjects
      

  4.   

    Declare @n int
    set @n=1
    while @n<30   --在这里设置一下数就可以了
     begin
       Insert tb
       Select top 1 * from tb
       set @n=@n+1
     end
      

  5.   

    --测试
    create table tb (i int)
    insert tb values (2)select 原始记录数=count(*) from tbDeclare @n int
    set @n=1
    while @n<30   --完成添加 2的4次方过相同记录
     begin
       Insert tb
       Select top 1 * from tb
       set @n=@n+1
     endselect 总记录=count(*),添加的记录条数=count(*)-1 from tbdrop table tb
    /*
    结果原始记录数       
    ----------- 
    1总记录         添加的记录条数     
    ----------- ----------- 
    30          29*/
      

  6.   

    declare 
    @n int
       set @n=0
               while @n<5 
                   begin
                       @n=@n+1
                       insert tablename
                         select top 1 * from tablename 
                     end
      

  7.   

    declare 
    @n int
       set @n=0
               while @n<5 
                   begin
                      set @n=@n+1
                       insert tablename
                         select top 1 * from tablename 
                     end
     select * from tablename