ROWID [message #60529] |
Thu, 12 February 2004 09:17 |
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 #60531 is a reply to message #60529] |
Thu, 12 February 2004 12:05 |
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 |
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 !
|
|
|