Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query of multiple record

Re: Simple Query of multiple record

From: Martyn Cavett <cavett_at_globalnet.co.uk>
Date: 1997/03/13
Message-ID: <01bc2ffc$f0c90060$a4547ec2@cavett.globalnet.co.uk>#1/1

Want you want is (something like)

SELECT name
FROM emp
WHERE sal > ( SELECT sal

		FROM    emp
		WHERE rownum < 4
		ORDER BY SAL DESC)

/

Joseph Jao <jjao_at_idt.net> wrote in article <33273FF8.F08_at_idt.net>...
> Hi, I tried to make a simple SQL command query to get the names of 3 top
> paid persons. "Select name, sal from emp where rownum<4 order by sal
> desc;" doesn't work. "Select name, sal from emp order by sal desc;"
> works but it'll bring everything. Can anyone help me?
>
> jjao_at_idt.net
>
  Received on Thu Mar 13 1997 - 00:00:00 CST

Original text of this message

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