Home » RDBMS Server » Server Administration » ROWID
ROWID [message #60529] Thu, 12 February 2004 09:17 Go to next message
Srilatha
Messages: 8
Registered: January 2000
Junior Member
Hi,

 

Is it possible, by any chance, the ROWIDs to be same for different tables?

Thanks

Sril

 
Re: ROWID [message #60530 is a reply to message #60529] Thu, 12 February 2004 09:25 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Sure, if those tables are part of the same cluster.

-Thiru
Re: ROWID [message #60531 is a reply to message #60529] Thu, 12 February 2004 12:05 Go to previous messageGo to next message
Michel Bartov
Messages: 35
Registered: February 2003
Member
A rowid consists of three parts: file id, block number and slot in this block. As a slot can be occupied at most by one row, a rowid uniquely identifies a row in a table. I don’t think the same rowid can belongs to two tables.

Michel.
http://www.barsoft.net/
Re: ROWID [message #60532 is a reply to message #60531] Thu, 12 February 2004 13:43 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
thats the normal situation, not in clusters. In clusters, ROWIDs can be shared (ie can belong to two different tables)


thiru@9.2.0:SQL>drop table t;

Table dropped.

thiru@9.2.0:SQL>drop table t2;

Table dropped.

thiru@9.2.0:SQL>create cluster t_t2(x int);

Cluster created.

thiru@9.2.0:SQL>create table t(x int) cluster t_t2(x);

Table created.

thiru@9.2.0:SQL>create table t2(x int) cluster t_t2(x);

Table created.

thiru@9.2.0:SQL>create index t_t2_idx on cluster t_T2;

Index created.

thiru@9.2.0:SQL>insert into t values(1);

1 row created.

thiru@9.2.0:SQL>insert into t2 values(1);

1 row created.

thiru@9.2.0:SQL>commit;

Commit complete.

thiru@9.2.0:SQL>select rowid from t;

ROWID
------------------
AAAH1VAAIAAAAdkAAA

thiru@9.2.0:SQL>select rowid from t2;

ROWID
------------------
AAAH1VAAIAAAAdkAAA

-- Same ROWID in both the tables !

Previous Topic: Privilege to run dbms_stats package
Next Topic: Oracle Forms Problem
Goto Forum:
  


Current Time: Fri Sep 20 12:21:45 CDT 2024