Is it safe to use ROWID to locate a Row/Record in Oracle?

前端 未结 3 949
一向
一向 2021-01-19 06:29

I\'m looking at a client application which retrieves several columns including ROWID, and later uses ROWID to identify rows it needs to update:

3条回答
  •  攒了一身酷
    2021-01-19 06:47

    "From Oracle 8 the ROWID format and size changed from 8 to 10 bytes. Note that ROWID's will change when you reorganize or export/import a table. In case of a partitioned table, it also changes if the row migrates from a partition to another one during an UPDATE."

    http://www.orafaq.com/wiki/ROWID

    I'd say no. This could be safe if for instance the application stores ROWID temporarily(say generating a list of select-able items, each identified with ROWID, but the list is routinely regenerated and not stored). But if ROWID is used in any persistent way it's not safe.

提交回复
热议问题