Reseeding Microsoft SQL Tables
Getting the current primary key seed value for a table
To get the next value from the primary key column of the database, either use the verbose descriptive CHECKIDENT method, or if you want to select it into a variable, use the IDENT_CURRENT function.
Updating the primary key seed for a table
You can use either CHECKIDENT again to set the value.
Updating the primary key seed automatically
Here’s how to increment based on the highest existing primary key: