declare @i int set @i = 0 while @i < 100 begin update table set column = @i where ID_column = @i set @i = @i + 1 end
SqlServer存储过程中循环写法
原文:https://www.cnblogs.com/ljs-13/p/12889071.html