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: Returning Row 20 to 29

Re: Returning Row 20 to 29

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/02/19
Message-ID: <34ed5956.8191358@192.86.155.100>#1/1

A copy of this was sent to "Huy V. Le" <huy_le_at_cs.concordia.ca> (if that email address didn't require changing) On Wed, 18 Feb 1998 16:04:42 -0500, you wrote:

>Hi Everyone,
>
>After what I have read from the newsgroup, You can limit the number of
>row return by using "rownum" (Assuming that you don't group)
>
>But let say you want to do a second query that will return row 20 to 29.
>
>Is it possible?
>
>Huy

SQL> select * from
  2 ( select T.*, rownum rnum

  3      from T
  4     where rownum < 30 )

  5 where rnum > 19;

Use the inline view to get the first 30, then get rid of the first 19 in the outer query....  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Feb 19 1998 - 00:00:00 CST

Original text of this message

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