What can cause an Oracle ROWID to change?

后端 未结 3 1489
無奈伤痛
無奈伤痛 2020-11-29 05:58

AFAIK ROWID in Oracle represents physical location of a record in appropriate datafile. In which cases ROWID of a record may change ?

The one known to me is UPDATE o

3条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 06:53

    As you have said, it occurs anytime the row is physically moved on disk, such as:

    • Export/import of the table
    • ALTER TABLE XXXX MOVE
    • ALTER TABLE XXXX SHRINK SPACE
    • FLASHBACK TABLE XXXX
    • Splitting a partition
    • Updating a value so that it moves to a new partition
    • Combining two partitions

    If is in an index organized table, then an update to the primary key would give you a different ROWID as well.

提交回复
热议问题