declare @kk int
declare @n bigint
set @n=1
declare cc cursor for select srcip from netids_eventlog
open cc
fetch next from cc into @kk
while @@fetch_status=0
begin
UPDATE netids_eventlog SET srcip =@n
WHERE CURRENT OF cc
set @n = @n+1
fetch next from cc into @kk
end
close cc
DEALLOCATE cc
直接在sql server中更新数据
最新推荐文章于 2019-04-12 18:04:00 发布