In database, such as Informix, DB2, Oracle etc, will the rowid be reused pls?
There are two scenarios in which duplicate rowids can occur. If you use an external table to unload a table and specify "format 'internal' compress true", NPS includes the rowids in the output. If you later reload that external table, the original rowids are preserved and brought back in.
rowids are unique within a table - period. We reuse them over time - absolutely. So if you delete from emp1, you are absolutely going to get "duplicates". We have to assume you do delete since - well - this is an after delete trigger..
Usually, a rowid value uniquely identifies a row in the database. However, rows in different tables that are stored together in the same cluster can have the same rowid.
It would not be safe if you intended to use the ROWID a long period of time after you SELECT it-- for example, if you allow users to edit data locally and then synchronize with the master database some arbitrary length of time later.
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
It can be reused:
If you delete a row, then Oracle may reassign its rowid to a new row inserted later.
(See this)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With