-If a PRIMARY KEY or UNIQUE constraint does not exist, later insert operations will result in duplicate identity values.
Checks the current identity value for the specified table in SQL Server 2017 and, if it is needed, changes the identity value.Because identity columns might be included as a part of the primary key, it is important to avoid duplicate values in the identity columns.To use identity columns in a replication topology that has updates at more than one node, each node in the replication topology must use a different range of identity values, so that duplicates do not occur.The table specified must contain an identity column.Table names must comply with the rules for identifiers. NORESEED Specifies that the current identity value should not be changed.ALTER TABLE (Transact-SQL)CREATE TABLE (Transact-SQL)DBCC (Transact-SQL)IDENTITY (Property) (Transact-SQL)Replicate Identity Columns USE (Transact-SQL)IDENT_SEED (Transact-SQL)IDENT_INCR (Transact-SQL) Note The feedback system for this content will be changing soon. If content within a comment thread is important to you, please save a copy.For more information on the upcoming change, we invite you to read our blog post.Caller must own the schema that contains the table, or be a member of the sysadmin fixed server role, the db_owner fixed database role, or the db_ddladmin fixed database role.The following example resets the current identity value, if it is needed, of the specified table in the Adventure Works2012 database.WITH NO_INFOMSGS Suppresses all informational messages. The specific corrections made to the current identity value depend on the parameter specifications. DBCC CHECKIDENT returns the current identity value and the current maximum value of the identity column.If the two values are not the same, you should reset the identity value to avoid potential errors or gaps in the sequence of values.