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

No comments:

How to Access a Home Lab Remotely Securely

Understanding Remote Access to Home Labs Definition and Common Use Cases A home lab is a personal network environment where technology e...