Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am following this SO post where the author (stack programmer) states

SQL server uses the identity column as the key value to refer to a particular row. So only a single identity column can be created.

He also mentioned that

Also if no identity columns are explicitly stated, Sql server internally stores a separate column which contains key value for each row.

Could anyone explain the two points(specially the second one) in more details?

Thanks

share|improve this question
add comment

migrated from stackoverflow.com Apr 4 '13 at 8:52

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 6 down vote accepted

Could anyone explain the two points(specially the second one) in more details?

I hope not, since they are both wrong. In SQL Server rows are identified by keys (in B-trees) or by row ids (in heaps). Non-unique clustered indexes have an internal uniqueifier column. The fact that often times an IDENTITY type column is also used as a primary key is orthogonal to the question.

Do not base your knowledge on stuff from posts on forums, including StackOverflow, and including this very post. A good source is the official documentation, eg. Tables and Index Data Structures Architecture. Read a good book, like the SQL Server Internals series.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.