Blog from Saravanan Arumugam

Let us talk about Technologies

Category Archives: SQL

Identity column Reseeding


I just came up with a need to reseed one of the tables I filled and deleted for testing purpose. (Reseeding is a process of making the table’s identity column start counting from a specified number for upcoming inserts)

Following command helped me achieve it.

DBCC CheckIdent ( myTable, Reseed, 1 )

Complete syntax of this command is

DBCC CHECKIDENT 
( ‘
table_name 
     [ 
, { NORESEED 
            | { RESEED [ , new_reseed_value ] } 
        } 
    ] 
)

References:  

DBCC CHECKIDENT

How do I… Reseed a SQL Server identity column?

Advertisements