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.

Does a system primary key or unique identifier for each row in a table exist? Like @@ROWID, @@IDENTIFER, or some other identifier that uniquely identifies each row regardless of how it was created? Using SQL Server 2000 through SQL Server 2012.

share|improve this question
3  
No, at least nothing you can get your hands on easily. Every row has some system-level location information - file id, page id and offset inside the page - but that information is very much internal to SQL Server and not easily accessible from the outside (and definitely not useable to select your row from T-SQL!) –  marc_s May 17 '13 at 4:55
2  
Do you mean like ROWID in Oracle? No. –  Aaron Bertrand May 17 '13 at 14:35
add comment

migrated from stackoverflow.com May 17 '13 at 14:13

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

1 Answer

In practical terms from a code or user perspective, no.

There is one internally (rid) but it is not exposed in any documented system view or function

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.