Oracle DBA, How To, Error, Cause and Action

Not advisable to use ROWID in your application

ROWID can uniquely identify record in your database.

In any given application I think it is not wise to use ROWID as part of the searching, this is because if you have done a recovery of the this database all the ROWID will be different.

For example:

Database A:

You have a script that will automaticall generate update scripts base on the ROWID

SELECT 'update mytable set.... where rowid = ' || rowid|| ....

The output of you scirpts may look like following...

UPDATE mytable SET...
WHERE ROWID = ......

You are then going to use this scripts as part of your application this script will not compatible to other database if say you have Database B (Disaster site), because as long as the instance are different you have chances the ROWID different


Conclusion:

It is advisable for you to create your own primary key, do not use ROWID in your application