Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query of multiple record
Hi
this query should work:
select name,sal
from emp e1
where 3 > (select count(*)
from emp e2 where e2.sal < e1.sal )
Rgds
Steinar Heggelund
Joseph Jao (jjao_at_idt.net) wrote:
: 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
-- ---------------------------------------------------------------------------- I'm employed in the Norwegian consulting company Opus One AS. I have 7 years experience with Oracle products, mainly the database. We are a small company which offers consulting services in design, implementation and tuning of databases and applications based on Oracle.Received on Thu Mar 20 1997 - 00:00:00 CST