There are the uses of auto increment in sql server which are listed below:-
1). Identifying Each Row Uniquely:
->Can be used in primary table to generate auto key as primary key in master table.
2). Maintaining Row Number:
->Identity (Auto increment) can be used to maintain row number.
3). Performance Reasons:
->Auto increment can be used as a primary key and as we know that primary key creates cluster index which results faster.
Asked In: Many Interviews |