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 question

Re: rownum question

From: AMARENDRA B NETTEM <nettama_at_charlie.cns.iit.edu>
Date: 1997/01/31
Message-ID: <01bc0ee6$adedefd0$82a757c6@vanaja>#1/1

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>...

> 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
>
Received on Fri Jan 31 1997 - 00:00:00 CST

Original text of this message

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