Answer:
There are various features of an Identity columns some are listed below:-
1. An identity column is an auto incrementing column.
2. An identity column is typically used as a primary key.
3. An identity column must be NOT NULL.
4. If you want to insert a specific value into the identity column you have to use the IDENTITY_INSERT setting.
5. If you truncate a table Identity resets the seed.
6. The data type of an identity column is typically an INT but can be most numeric data types. ie tinyint,smallint,int, bigint,decimal,or numeric.
7. A primary key that’s an identity column is usually a surrogate key.
8. A surrogate key is one that is not related to the contents of the row in any way.
Asked In: Many Interviews |
Alert Moderator