If you still want to do this in SQL, check out the following:
SQL TIP: Auto Increment in an UPDATE statement.
http://haacked.com/archive/2004/02/28/sql-auto-increment.aspx
This works best if you are using it in a stored procedure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.