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!

ROWNUM deterministic?

513875May 19 2006 — edited May 22 2006
Hi,

I need to identify single rows of a given (say "query1") query which may occur several times nested in another query. E.g. like this:

select * from (<query1>) T join (<query1>) S on ...

Now, if I select ROWNUM in "query1" will the selction order be the same every time (i.e. will the same rows have the same rownum in every occurence of "query1"?).

I want to be able to do something like:

select * from (<query1>) T join (<query1>) S using (rownum)

and corresponding tuples to be matched.
(Ok, basically the query above won't work, I'll have to use an alias for "rownum" in "query1" and join on that, but you get the idea.)

Thanks,
Al
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2006
Added on May 19 2006
14 comments
1,335 views