Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: select limit of returned rows
> How about
> WHERE rownum > 19 AND rownum < 41
Conditions testing for ROWNUM values greater than a positive integer are always false. For example, this query returns no rows:
SELECT * FROM emp
WHERE ROWNUM > 1; The first row fetched is assigned a ROWNUM of 1 and makes the condition false. The second row to be fetched is now the first row and is also assigned a ROWNUM of 1 and makes the condition false. All rows subsequently fail to satisfy the condition, so no rows are returned.
I think
select * from
(SELECT emp.*, ROWNUM FROM emp where rownum < 41) where ROWNUM>19 ;
HTH
Best regards
Sergey Gerasimov
gsa_at_baltros.ru
Received on Mon Jul 23 2001 - 09:16:19 CDT