Is there a way to tell SQL server to use specific default seed value for IDENTITY columns – assuming the (to be run) CREATE TABLE statements do not specify one? I don’t really care about altering existing data or altering the seed values for specific IDENTITY columns. I want the same seed for all newly created identity columns. Assume I cannot modify the individual CREATE TABLE statements in any way.
Share
the syntax is:
You must specify both the seed and increment or neither. If neither is specified, the default is (1,1). There is no way to set a different global default other than the (1,1). The only way to set a value other than (1,1) is to code it on the column.
here is the documentation: IDENTITY (Property)
EDIT
Based on this command:
You could use this script to reset all identity columns to the same
@new_reseed_valuevalue: