There lies a difference between Primary Key
and Identity.Identity
Property creates an identity column in a table with syntax:
IDENTITY [ ( seed , increment ) ]
where increment
is the incremental value that is added to the identity value of the previous row that was loaded which can be + or - depending on the requirement.
and Primary Key is a column or combination of columns that contain values that uniquely identify each row in the table. It can be any set of columns other than the Identity column if they garuntees unique identification of rows in the table.
Coming back to the question a table can have only one PRIMARY KEY constraint, and a column that participates in the PRIMARY KEY constraint cannot accept null values. Because PRIMARY KEY constraints guarantee unique data, they are frequently defined on an identity column.
So SQL server don't assign any default value to a primary key as it's a constraint. When you specify a PRIMARY KEY constraint for a table, the Database Engine enforces data uniqueness by creating a unique index for the primary key columns.