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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to select rows in a given range?

Re: How to select rows in a given range?

From: Steve McDaniels <steve.mcdaniels_at_sierra.com>
Date: Thu, 28 Sep 2000 16:19:17 -0700
Message-ID: <8r0jld$jkh$1@spiney.sierra.com>

Is that faster?

<jlburke_at_my-deja.com> wrote in message news:8r08rg$l4p$1_at_nnrp1.deja.com...
> Try this:
>
> select * from tableA
> where rownum < 150
> having rownum > 100;
>
>
>
> In article <D3NA5.5664$l35.134624_at_iad-read.news.verio.net>,
> "Emre Akbag" <akbag_at_scr.siemens.com> wrote:
> > How can I select rows from a table in a given range?
> >
> > I can restrict maximum number of rows fetched using "rownum", like :
> >
> > select * from tableA where rownum < 100;
> >
> > But, as documented in Tech.net too, "rownum" doesn't work with
 "between" or
> > ">" operators.
> > That's why, following queries DON'T work:
> >
> > select * from tableA where rownum > 100 ;
> > OR
> > select * from tableA where rownum BETWEEN 100 AND 150;
> >
> > How can I realise this? I'd appreciate any ideas.
> >
> > --
> > Thanks in advance
> >
> > Emre AKBAG
> >
> > akbag_at_scr.siemens.com
> > Siemens Corporate Research
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Sep 28 2000 - 18:19:17 CDT

Original text of this message

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