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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to use ROWNUM

Re: How to use ROWNUM

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/04/08
Message-ID: <38EEDDFA.22C@yahoo.com>#1/1

Vincent Chen wrote:
>
> Dear all
>
> I have a very large table.
> And the content in this table will be display in Web page.
> (using ADO + ODBC)
>
> Since the size of table is too big, I wish to display all tuples page by
> page.
> I found 'rownum' command in oracle document.
> however, the following command is not worked.
>
> select ...
> from ...
> where rownum between 100 and 200;
>
> this command return no rows ....
>
> can somebody help me ....

select *
from ( select rownum rnum, a.* from table a where rownum < 200) where rnum > 100

but it would be far more practical to have some sort of sequencing column on your rows - given that there is no guarantee that rownum gives your the rows in a pre-ordained sequence.

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Sat Apr 08 2000 - 00:00:00 CDT

Original text of this message

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