|
Posted by Erland Sommarskog on 10/16/07 21:12
Tim (tim_rogers01@hotmail.com) writes:
> I come from an Informix background, (pauses for the laughter to die
> down), where SQL can access a hidden attribute, (ROWID), that uniquely
> identifies each record in a table at that point in time. It's similar
> to an IDENTITY attribute but it is not visible unless specifically
> selected and the RDBMS actively re-uses the numbers as they become
> vacant through deletion of records.
>
> However it can be very useful if you are trying to unscramble static
> but erroneously duplicate data rows built up due to an 'undocumented
> feature' of the application software. This is the situation I find
> myself in at the moment, so I was wondering if there was anything of a
> similar nature hidden or undocumented in SQL Server?
>
> I realise I could make a copy of the table and add an IDENTITY
> attribute, but I'm playing with some 75,000,000 rows of data that must
> all be salvaged, which complicates matters a little.
No, there is no such internal key exposed. Gert-Jan described the keys
that SQL Server uses internally, but you cannot access rhe RID (in heaps)
or the uniquifier (in clustered indexes) in queries.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|