I’m looking at a client application which retrieves several columns including ROWID, and
later uses ROWID to identify rows it needs to update:
update some_table t set col1=value1
where t.rowid = :selected_rowid
Is it safe to do so? As the table is being modified, can ROWID of a row change?
“From Oracle 8 the
ROWIDformat and size changed from 8 to 10 bytes. Note thatROWID‘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 anUPDATE.”http://www.orafaq.com/wiki/ROWID
I’d say no. This could be safe if for instance the application stores
ROWIDtemporarily(say generating a list of select-able items, each identified withROWID, but the list is routinely regenerated and not stored). But ifROWIDis used in any persistent way it’s not safe.