tags:

views:

301

answers:

3

In database, such as Informix, DB2, Oracle etc, will the rowid be reused pls?

+5  A: 

The RowID are physical location of the data stored on the disk. They are unique for a table. As such they can repeat. If the new record gets stored in the same place (deleting the older one), then rowids would be same (reused).

See this article for details on what rowid consists of in oracle http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns008.htm

Dheer
why can different records in different tables have the same rowid pls?
Xiaowei
If you go through the article it would explain ... basically if two tables are in same cluster, then they can possibly have same rowid.
Dheer
+2  A: 

It can be reused:

If you delete a row, then Oracle may reassign its rowid to a new row inserted later.

(See this)

Anton Gogolev
+1  A: 

alos - be aware it can change if you export and then import your database. you should never store this value as a key as it is unreliable.

Randy