Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple SQL Question
Paulo Odulio:
Just add and rownum <= 3 at the end of your WHERE clause. This will give you the first three records being selected. An example is below:
select ename, sal
from emp
where <condition>
and rownum <= 3
order by sal desc;
Kevin
Paulo Odulio wrote in message <352EDF4B.5782278C_at_email.sps.mot.com>...
>
>
>What shall I add to the where clause to be able to
>get only the first 3 records?
>
>select ename, sal
>from emp
>where <condition>
>order by sal desc;
>
>Thanks,
>-Paulo
>
Received on Sat Apr 11 1998 - 07:30:48 CDT
![]() |
![]() |