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: Result set positioning

Re: Result set positioning

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 05 Jul 2001 22:35:43 -0700
Message-ID: <3B454E2F.4E33C816@exesolutions.com>

Francesco Rossi wrote:

> Hi at all,
> i must select a range of record from a table starting at record position x,
> example: in a table with 100 records i must start the result set from the
> 20th record wthout any order, such as SELECT * FROM TABLE NEXT 20.
> How i can do this with a Select ?
> Thank

Something tells me this is a test question and you want us to do it for you ... but what the heck.

SELECT field1, field2
FROM (
   SELECT field1, field2, rownum
   FROM mytable)
WHERE rownum > 19
AND rownum < 40;

Daniel A. Morgan Received on Fri Jul 06 2001 - 00:35:43 CDT

Original text of this message

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