CELKO (1/5/2012)
This is only one reason why good SQL programmers never use this proprietary non-relational "feature" in their code.Back to foundation. SQL is a set-oriented language. When you do an INSERT you put in a set, all at once. That set can be zero or more rows.
But IDENTITY is a sequential count of insertion attempts. PHYSICAL insertion attempts. Not a LOGICAL concept at all. So how do you number these rows?
Please read a book on RDBMS; your mindset is still in magnetic tape files and not RDBMS yet.
Actually, good programmers use this feature all the time and for good reason. Please see the following video...
http://technet.microsoft.com/en-us/sqlserver/Video/gg508879
--Jeff Moden
Change is inevitable... Change for the better is not.