Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first row from a select
A copy of this was sent to Randall <aslan-zzz_at_pcmagic.net> (if that email address didn't require changing) On Tue, 06 Oct 1998 09:18:42 -0700, you wrote:
>> I think you are referring to ROWID, which in Oracle7 was of the form
>> "block.slot.file," and in Oracle8 is an opaque identifier that can be
>> decoded to provide the block, slot, and file of a row.
>>
>Opaque identifier? They just went from representing it in base 16
>(hexidecimal) to base 52 (or some numbr around there). Doesn't everyone
>know base 52? <g>
well, its base64 encoded, not 52 and its very easy to decode as follows:
SQL> select rowid,
2 dbms_rowid.rowid_relative_fno( rowid ) "Relative File#", 3 dbms_rowid.rowid_block_number( rowid ) "Block#", 4 dbms_rowid.rowid_row_number( rowid ) "Row#"5 from dual;
ROWID Relative File# Block# Row#
------------------ -------------- ---------- ---------- AAAACsAABAAAAGiAAA 1 418 0
so, in some ways, due to the dbms_rowid package, its easy in O8 to get this info then in O7....
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
-- http://govt.us.oracle.com/ -- downloadable utilities ---------------------------------------------------------------------------- Opinions are mine and do not necessarily reflect those of Oracle Corporation Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it.Received on Wed Oct 07 1998 - 00:00:00 CDT