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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/03/02
Message-ID: <34fbbcb2.1544951@192.86.155.100>#1/1

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

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 Mon Mar 02 1998 - 00:00:00 CST

Original text of this message

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