SQL Flow Field Guide

DBCC CHECKIDENT

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

checks or resets the identity counter

What changes

Input
identity column current value and max column value
Output or change
identity seed (RESEED) or a message

Syntax at a glance

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

Work example

An incident review needs to compare a table's identity state with its stored keys.

Inspect the current maximum key and identity state before considering any reseed operation.

Check your work The next generated value will not collide with a stored key.

Open Microsoft Learn for full syntax, permissions, and details for your version.