Something like an identity seed would do the trick.
Code:
ALTER TABLE MyTbl ADD [newcolname] [int] IDENTITY (1, 1) NOT NULL
This should populate what is already there with an ideltity as well so it's up to date. Test first though, then test adding a row after to make sure continuity of the seed is correct as I haven't tested the whole thing.
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.