Reset identity seed after deleting records in SQL Server

Example:

The DBCC CHECKIDENT management command is used to reset identity counter.
The command syntax is:
DBCC CHECKIDENT (table_name [, { NORESEED | { RESEED [, new_reseed_value ]}}])
[ WITH NO_INFOMSGS ]
Reset Identity
Example:
DBCC CHECKIDENT ('transactionhead', RESEED, 0);
To Check current identity value
Example:
DBCC CHECKIDENT(transactionhead)



Post a Comment

0 Comments