| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: restrict the amount of a select's result set
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.
-- NorbertReceived on Tue Dec 12 2006 - 08:47:46 CST
![]() |
![]() |