Reseting Indentity Column of a Table

  • How to Reset the value of an Identity column in SQL Server Table

  • Hi Ravi,

      You can change the seed value of identity column by using the statement

    DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)

    By using the truncate command the identity column is reset to the seed value.

    Hope this answers your query.

    Nivedita Sundar.N

     

  • Hi Ravi,

    The truncate option wont work for columns with dependencies. The DBCC CHECKIDENT will work.

    Nivedita Sundar.N

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply