Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ROWNUM, order by
> If I want rows 10-15 as above and I do:
> select * from myview where rownum > 9 and rownum < 16;
> I always get "no rows selected". WHY? [...]
ROWNUM is assigned to records that fulfill the entire WHERE clause.
The first record that fulfills the WHERE clause gets rownum 1, and so on.
If the where clause specifies that the rownum must be greater than 1, the where clause will never be fulfilled. Oracle realizes this and doesn't bother to perform the query.
This is logically equivalent to specifying "where 1=2" or similar contradictory clauses.
-bn Received on Wed May 20 1998 - 13:05:34 CDT
![]() |
![]() |