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: Simple SQL Question

Re: Simple SQL Question

From: T Suresh kumar <defaultuser_at_domain.com>
Date: Sat, 11 Apr 1998 11:04:58 +0530
Message-ID: <352F0101.6AB232CD@domain.com>


hai

@@@ select ename,sal
@@@ from emp
@@@ where rownum <= (select count(*)-(count(*)-3) from emp)
@@@ order by sal desc

I am suresh above query@ solves ur problem.

Regards
Suresh
@

Paulo Odulio wrote:

> 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
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@
> -------------------------------------------------------------------------------------------------------------
>
> @ Paulo Odulio <r40890_at_email.sps.mot.com>
> @ Systems Analyst
> @ Motorola Semiconductor Products, Regional Development Center
>
> @ Paulo Odulio
> @ Systems Analyst@@@@@@@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@ <r40890_at_email.sps.mot.com>
> @ Motorola Semiconductor Products, Regional Development Center
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@ Netscape
> Conference Address
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@ Netscape
> Conference DLS Server
> @ Additional Information:
> @ Last Name@@@@ Odulio
> @ First Name@@@ Paulo
> @ Version@@@@@@ 2.1

@@ Received on Sat Apr 11 1998 - 00:34:58 CDT

Original text of this message

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