Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: rownum question
Hi PTSAO,
The reason is 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 this condition FALSE. All rows
subsequently
fail to satisfy the condition , so no rows are returned.
Hope this helps
-- AMARENDRA B NETTEM ORACLE CONSULTANT WHITTMAN-HART INC., CHICAGO (http://www.iit.edu/~nettama) ptsao_at_sequeltech.com wrote in article <32EFD1DB.A7D_at_sequeltech.com>...Received on Fri Jan 31 1997 - 00:00:00 CST
> Hi,
>
> I was able to do
>
> select * from table where rownum = 1;
> select * from table where rownum <= 20;
> update table
> set id = rownum;
>
> but, I CAN NOT do
>
> select * from table where rownum = 2;
> select * from table where rownum = 3;
> ...
>
> Can someone tell me why?
>
> Thanks,
>
> Phil Tsao
>