Increase value of an identity column in SQL Server without dropping and recreating the table

Kjensen picture Kjensen · Jun 12, 2009 · Viewed 13.6k times · Source

In a table, I have an ID column, that is an Identity int.

How can I make it so that the next row inserted will get identity 10000 (I believe this is called the identity seed) - without dropping and recreating the table?

I need to do this because of a uniqueness issue with an external service, the app accesses.

Answer

TheTXI picture TheTXI · Jun 12, 2009
DBCC CHECKIDENT (yourtable, reseed, 9999)

This will make the next entry 10000.