declare @i INT set @i=0 update 表名 SET [列名]=@i,@i=@i+1 WHERE 条件 转载于:https://www.cnblogs.com/kangjing/p/3934342.html