Mega Code Archive

 
Categories / MSSQL Tutorial / Sequence Indentity
 

Using the IDENTITY Property and the IDENTITY() Function

The IDENTITY property enables you to assign an auto-number to a numeric column. Values for a column with an IDENTITY property are generated automatically. The IDENTITY column must be of datatype int, bigint, smallint, tinyint, decimal, or numeric with a scale of 0. It must be non-NULLable.