Wednesday, 4 April 2012

What is Identity Columns in Sql. What are its advantages & disadvantages?

In MSSQL there is a feature called a Identity which automatically generates a new sequential no for new record. This is a very good features because once it’s applied on any column developer needs not to be worry about maintaining numbers. SQL automatically fetches a new id & inserts into table.


This features is a panic only when some transaction is running & during execution some error occurs & transaction rolls back or if delete command is fired on system instead of Truncate command. In these scenarios identity sequence doesn’t rollback to its original count & starts from the very next value which system was trying to generate last time.

No comments:

Post a Comment