sql 循环插入某一条数据

declare @i int
set @i=1
while @i<(10000)
begin

INSERT INTO [Table]( [IDi] ,[IDo] ,[Synci] )

( SELECT top 1 [IDi] ,@i ,[Synci] FROM [Table] )


set @i=@i+1

end

posted @ 2014-03-31 13:50  ahuo  阅读(393)  评论(0编辑  收藏  举报