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: restrict the amount of a select's result set

Re: restrict the amount of a select's result set

From: Norbert Winkler <norbert.winkler1_at_gmx.de>
Date: Tue, 12 Dec 2006 15:47:46 +0100
Message-ID: <kjnyq2mbr67l.1fahfsee7quz6.dlg@40tude.net>


Am 12 Dec 2006 03:56:39 -0800 schrieb Charles Hooper:

> If I slide the above into an inline view, I can use ROWNUM to retrieve
> only the first two rows:
> SELECT
> X,
> Y,
> Z
> FROM
> (SELECT
> X,
> MIN(Y) Y,
> MIN(Z) Z
> FROM
> TABLE1
> GROUP BY
> X)
> WHERE
> ROWNUM<=2;
>
> X Y Z
> ========== ==========
> 1 1 5
> 2 6 1
>

Thanks, that solves exactly the problem.

-- 
Norbert
Received on Tue Dec 12 2006 - 08:47:46 CST

Original text of this message

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