What's the feature of an Identity columns?

 Posted by vishalneeraj-24503 on 8/27/2014 | Category: Sql Server Interview questions | Views: 1545 | Points: 40

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 

Comments or Responses

Login to post response