declare @i int set @i=1 while @i<=10000 begin insert into zpb (RYBH,PIC) select rybh,pic from zpb where zybh = '1' set @i=@i+1 end GO