Skip to main content

SQL Server - Reset identity counter

· One min read
Tony Woo

The DBCC CHECKIDENT management command is used to reset identity counter. The command syntax is:

Syntax
DBCC CHECKIDENT (table_name [, { NORESEED | { RESEED [, new_reseed_value ]}}])
[ WITH NO_INFOMSGS ]
Example
DBCC CHECKIDENT ('[NameofTable]', RESEED, 0);
GO

It was not supported in previous versions of the Azure SQL Database but is supported now.