方法1:传统的循环写法
declare @i int
set @i = 0
while @i < 100
begin
update table set column = @i where ID_column = @i
set @i = @i + 1
end
方法2:
游标
方法1:传统的循环写法
declare @i int
set @i = 0
while @i < 100
begin
update table set column = @i where ID_column = @i
set @i = @i + 1
end
方法2:
游标