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: Limit the Number of Rows Returned by Select ?

Re: Limit the Number of Rows Returned by Select ?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 06 Oct 2000 19:00:57 +0800
Message-ID: <39DDB0E9.4775@yahoo.com>

Hardy Merrill wrote:
>
> In article <stqie92teqd5d9_at_corp.supernews.com>,
> dont_at_spam.me (Jon Santarelli) wrote:
> > stevechol_at_freeuk.com (Steve Cholerton) wrote in
> > <udaptso0tj6nafjfjn5npumktigsbdhqaj_at_4ax.com>:
> >
> > >Hi all, can anybody advise if there is a way to limit the number of
> > >rows returned by a select
> > >
> >
> > select * from table
> > where attribute = something
> > and rownum < 11;
> >
> > Will give you the first 10 rows. You may need or want to do an order
> > by or something else to get the rows that you actually want.
>
> How about if I want rows 50-60 - would I have to say "and rownum < 61,
> and skip the first 49?
>
> TIA.
>
> --
> Hardy Merrill
> Mission Critical Linux, Inc.
> http://www.missioncriticallinux.com
>
> >
> > Jon
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

select *
from blah
where rownum < 60
minus
select *
from blah
where rownum < 50

HTH

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

We are born naked, wet and hungry...then things get worse
Received on Fri Oct 06 2000 - 06:00:57 CDT

Original text of this message

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