Friday, May 06, 2016

Update Incrementer with T-SQL instead of using a cursor


SQL TIP: Auto Increment in an UPDATE statement. - Credit - http://haacked.com/archive/2004/02/28/sql-auto-increment.aspx/ 


DECLARE @counter int SET @counter = 0 UPDATE #tmp_Users SET @counter = counter = @counter + 1
Post a Comment