Reseed a SQL Server identity column

We all use them. But confess rarely need to change the seed on an identity colum in SQL server. Or if I do, it's probably going to happen via dropping and recreating the table. But once in a while it's handy to be able to change the seed.

How do I… Reseed a SQL Server identity column?

DBCC CHECKIDENT
(
tablename
  [, [NORESEED | RESEED [, newreseedvalue]]]
)

Is something I'm tucking away in my goody bag for another day.

 

 

 

 

 

 

Leave a comment