Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What's the meaning of ROWID?

Re: What's the meaning of ROWID?

From: Martin Haltmayer <Martin_Haltmayer_at_KirchGruppe.de>
Date: 1998/03/03
Message-ID: <34FC0A88.16121C90@KirchGruppe.de>#1/1

How can you have twice the same combination of (FILE the row is in, BLOCK within the file the row is in, SLOT in the block the row is in)?

Martin Haltmayer

Thomas Kyte wrote:
>
> A copy of this was sent to Jimmy <c6635500_at_comp.polyu.edu.hk>
> (if that email address didn't require changing)
> On Mon, 02 Mar 1998 12:38:54 -0800, you wrote:
>
> >Hello all,
> >
> > Could anyone tells me what is the meaning of rowid? Is rowid unique
> >with each record in a table? Is the lastest record with the largest
> >rowid in a table?
> >
> >Thanks,
> >Jimmy
>
> A rowid in Oracle is a physical address of a row. In Oracle7, it is the
>
> - FILE the row is in
> - BLOCK within the file the row is in
> - SLOT in the block the row is in
>
> In Oracle8, the internal format of the rowid is still file/block/slot however
> the file# is a relative file number (relative within a tablespace).
>
> Externally, in Oracle7, you can see the file/block/slot easily in the external
> representation of the rowid
>
> SQL> select rowid from dual;
> ROWID
> ------------------
> 0000033D.0000.0001
>
> In Oracle8, they added more data to the external representation of the rowid, so
> that it is not as 'readable' (but they added the dbms_rowid package to extract
> all of the useful information):
>
> SQL> select rowid from dual;
> ROWID
> ------------------
> AAAACsAABAAAAGiAAA
>
> A rowid is unique within a table -- and only within a table. The same Oracle7
> rowid (believe it or not) can appear within the same database more then once. A
> rowid is assigned to a row when it is inserted and stays with that row until it
> is deleted (so if you insert a row, remove the row from the DB and then
> re-insert it, it will probably get a different rowid the second time).
>
>
> 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 Tue Mar 03 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US