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: Reduce data returned by a query

Re: Reduce data returned by a query

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Fri, 24 Jan 2003 12:30:41 -0800
Message-ID: <3E31A271.1D073977@exesolutions.com>

elziko wrote:

> If I have a query such as :
>
> SELECT mycolumn FROM mytable;
>
> ...which returns eight rows like so:
>
> "One"
> "Two"
> "Three"
> "Four"
> "Five"
> "Six"
> "Seven"
> "Eight"
>
> Is it possible to return only every OTHER row? So that only the odd numbered
> rows are returned like so:
>
> "One"
> "Three"
> "Five"
> "Seven"
>
> I know I can just get rid of my data after the query but then I'm wasting
> the DB access time getting data I dont want.
>
> Many thanks,
>
> elziko

Use an in-line view and the mod() function.

Is this for a class?

Daniel Morgan Received on Fri Jan 24 2003 - 14:30:41 CST

Original text of this message

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