I want to update a table with consecutive numbering starting with 1. The update has a where clause so only results that meet the clause will be renumbered. Can I accomplish
UPDATE TableName SET TableName.id = TableName.New_Id FROM ( SELECT id, ROW_NUMBER() OVER (ORDER BY id) AS New_Id FROM TableName ) TableName