IDENTITY (Function)
generates an identity column
What changes
- Input
- data type, seed, increment
- Output or change
- new identity column in a SELECT INTO target
- Return type
- Returns the same as data_type.
Syntax at a glance
IDENTITY ( data_type [ , seed , increment ] ) AS column_name
Work example
Maintain an existing table definition that uses the IDENTITY function in a select-into operation.
Use a primary key and explicit identity column in new table design rather than relying on copied query shape.
Check your work IDENTITY generates a column property and is not the function for reading a generated value after insert.
Open Microsoft Learn for full syntax, permissions, and details for your version.