• stephen.lear (7/27/2011)


    I think the reason you can't access the internal ID is that it can change when a reorganization takes place. So you'd break any integrity that relied on the key. This is why we have identity fields that don't change by themselves.

    Oracle exposes the internal address of the row as a pseudocolumn called ROWID. However, I've never found a practical use for it. When it comes to de-duplicating, it's more appropriate to rank() the rows using a combination of columns. Even when dealing with a table that has true duplicates, the same column values straight across, the function row_number() can be used instead of a ROWID, and it's more useful because it's an integer. In Oracle, ROWID is represented as a 16 byte hex string.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho