Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using ROWID in the ORDER BY clause

Pasquale Massimo ScorcaApr 30 2015 — edited May 3 2015

Hi,

I can consider myself as a PL/SQL beginner. I need to query some existing tables created for audit scope.

These tables have more duplicate rows respect to the same audit date: the precision is at "hour and minute and second" level.

But I need to understand which is the more recent row for the same audit date. So I think to use in the SELECT statement

the clause ORDER BY in this manner:

SELECT ... FROM Audit_Table ORDER BY Audit_Date desc, ROWID desc.

I'd like to use this ORDER BY also for the ROW_NUMBER function.

Any suggests to me about this topic? Many thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2015
Added on Apr 30 2015
36 comments
17,967 views