Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ROWNUM problem...

Re: ROWNUM problem...

From: TurkBear <johng_at_mm.com>
Date: Thu, 30 Apr 1998 20:25:39 GMT
Message-ID: <354add5e.23951230@news2.mm.com>

You'll probably get a more technical answer, but in essence 'rownum' is not a value in the table and when you use it in a where statement ( other that a < , which sqlplus handles as a special case ) the query fails.

Rownum is assigned as the record is returned and sqlplus is able to read it and compare it to the < operator's value and stop when it has been reached - no other operator works with rownum ( you can't say rownum > 10 for instance )

Jimmy <c6635500_at_comp.polyu.edu.hk> wrote:

>Hello all,
>
> When I type "select A from AAA" then 100 rows selected.
> Now, I want to select the first 10 records. So I type "select A from
>AAA where rownum > 0 and rownum <= 10", then 10 rows selected.
> Now, I want to select the NEXT 10 record by "select A from AAA where
>rownum > 10 and rownum <= 20", then no row selected.
>
> Could anyone tell me why no row selected? And how to select the NEXT 10
>records by a SQL statement?
>
>Thanks,
>Jimmy
Received on Thu Apr 30 1998 - 15:25:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US