Is there any way to select "ROWID" of a record?

Database
Enthusiast

Is there any way to select "ROWID" of a record?

Hi everyone,

is there any way to select the "ROWID" of a record? as we could do in Oracle?

My requrement is to delete the duplicate records(based on some particular group of coluns) from a table.

selecting ROWHASH wont solve my problem in this reg i beleive.

Pls help.
3 REPLIES
Enthusiast

Re: Is there any way to select "ROWID" of a record?

You can use select ROWID from tablename syntax to do so. You can generate a sub-query to acheive your goal.
Enthusiast

Re: Is there any way to select "ROWID" of a record?

I don't think "select rowid" is supported in recent releases. I vaguely recall that, even in releases that allowed it, rowid could not be referenced in a search condition.

To remove duplicate rows, first do a select distinct into a temporary table, then delete from the target table using the same search condition, and then insert them back from the temporary table.
Enthusiast

Re: Is there any way to select "ROWID" of a record?

Hi,
The usage of ROWID in DML statement is not allowed in v2R5 onwards.
It is used only by Optimizer to join the Join Index back to the base table in case of Partial covering query to fetch the result set.
User is not allowed to use ROWID.

Thanks