Home Forums SQL Server 2008 T-SQL (SS2K8) how to alter the existing id values to idetity(1,1) RE: how to alter the existing id values to idetity(1,1)

  • ScottPletcher (8/29/2013)


    ALTER TABLE dbo.tblemployee

    ADD ident int IDENTITY(1, 1) NOT NULL

    Edit: Added "NOT NULL"

    You are adding a new column with IDENTITY property and it works..

    The thing is that we cant add IDENTITY property to any existing column of table...

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/