Home Forums SQL Server 2012 SQL 2012 - General Syntax help please - How do I update a column with a sequence of numbers starting from 1 RE: Syntax help please - How do I update a column with a sequence of numbers starting from 1
mw_sql_developer
SSCoach
Points: 19445
More actions
October 7, 2015 at 3:17 pm
#1832154
No need
Found answer....
DECLARE @id INT
SET @id = 0
UPDATE accounts2
SET @id = id = @id + 1
GO