How to find the identity column seed value?

lizou
Contributor III

How to find the identity column seed value? A seed value is required when we need specifically like start generating new values from a number (most likely we need to keep the original key values when data is reloaded from another source, and any new data need starts from the current max value +1)

new from runtime 10.4

GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( [ START WITH start ] [ INCREMENT BY step ] ) ]

I have done searching on documents, and there is no result.

in sql server, the equivalent statement is

-- check current identity seed value

DBCC CHECKIDENT ('dbo.table_with_identity_col');