Thursday, April 2, 2015

ROWID in Toad

Just a quick reminder to myself...  Was trying to understand a query to delete duplicates out of an Oracle table a bit better, but I could not understand why Toad did not display the ROWID.  For example:

select a.rowid, a.* from table_xyz a where a.rowid > (select min(b.rowid) from table_xyz b where b.some_column = a.some_column);

I eventually found that by aliasing ROWID, it will display in Toad.  For example:
select a.rowid as show_me ...
There's also a way to perform various clicks in the correct spot of the Data Grid to enable the display of ROWID...  But the alias is easier to explain here...
 
 
 

No comments: