Identity column - seed value

  • I would like to truncate a large table (12 million rows) but retain the current value of the identity column. I know I can do this through enterprise manager by changing the seed value after truncating and I know that the delete will not reset the value. How can I set the seed value in a Tsql?

    Thanks

  • This example forces the current identity value in the jobs table to a value of 0.

    USE pubs

    GO

    DBCC CHECKIDENT (jobs, RESEED, 0)

    GO

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

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