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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Rownum

Re: Rownum

From: Van Messner <vmessner_at_netaxis.com>
Date: Mon, 3 May 1999 18:33:32 -0400
Message-ID: <QApX2.3040$fO5.102641@news14.ispnews.com>


This won't always work, depending on what you need to do with the rows. But as a select statement you can get rows 11 to 20 by Select * From x Where rownum < 21
Minus
Select * From x Where rownum < 11;

Jonathan Lewis wrote in message
<925756801.9863.0.nnrp-03.9e984b29_at_news.demon.co.uk>...
>One possible approach is to create a transient table
>for the results, and number each row as it goes into
>the table. Then you can select rows by the rownumber
>you have created.
>
>Obviously it is not very desirable to keep creating and
>dropping tables, although 'create as select unrecoverable'
>is not too heavy on redo, so ..
>
>You could keep a set of permanent tables, and log of
>current state, and allocate a table to a session etc, only
>creating a new table if you run short, and perhaps de-allocating
>a table from a session if the log shows the session to be over
>24 hours since last action.
>
>--
>
>Jonathan Lewis
>Yet another Oracle-related web site: www.jlcomp.demon.co.uk
>
>Sue French wrote in message <7AlX2.283$vO1.17284_at_news.tcp.co.uk>...
>>For an intranet application, I need to fetch say 10 records. I can do this
>>by specifiying "WHERE ROWNUM < 11".
>>
>>I have to avoid using cursors, because this is causing no end of problems,
>>so I really need to connect to the database, fetch the 10 records then
>>disconnect and subsequently connect and disconnect when the next/previous
>10
>>are requested.
>
>
>
Received on Mon May 03 1999 - 17:33:32 CDT

Original text of this message

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