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!

problems with rownum>x and rownum between x and y

551630Dec 15 2006 — edited Dec 15 2006
Hi,

I have a problem using rownum>x and rownum between two numbers, however rownum<x is OK.

This is the case:

If I do the following SELEC:
select distinct attributename from ddd_model_attribute_names order by 1;

It returns 28 rows.

If I do this:
select distinct attributename from ddd_model_attribute_names where rownum<8 order by 1;

It returns 7 rows.

If I do:
select distinct attributename from ddd_model_attribute_names where rownum<25 order by 1;

It returns 24 rows

If I do:
select distinct attributename from ddd_model_attribute_names where rownum<40 order by 1;

It returns 28 rows


However, if I try to have rownum>21 it doesn't find anything, also if I have rownum between 7 and 14, it doesn't return any rows. Why is that? What can I do to solve this issue?

Thank you.
Regards,
Anne
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2007
Added on Dec 15 2006
4 comments
5,237 views