What is the procedure to write the query to list the highest salary of three employees?

Questions by renukhareddy

Showing Answers 1 - 9 of 9 Answers

Rishi

  • Dec 5th, 2005
 

SELECT sal
FROM (SELECT sal FROM my_table ORDER BY sal DESC)
WHERE ROWNUM < 4;

  Was this answer useful?  Yes

kalyan

  • Dec 20th, 2005
 

hai

 there is max function in Informatica use it.

kalyan

  Was this answer useful?  Yes

Ray Anthony

  • Mar 22nd, 2006
 

since this is informatica.. you might as well use the Rank transformation.  check out the help file on how to use it.

Cheers,

Ray Anthony

  Was this answer useful?  Yes

Deshmukh Sachin

  • Apr 25th, 2006
 

select max(sal) from emp;

  Was this answer useful?  Yes

prasad

  • Apr 27th, 2006
 

 the following is the query to find out the top three salaries

in ORACLE:--(take emp table)

select * from emp e where 3>(select count (*) from emp where

e.sal>emp.sal) order by sal desc.

in SQL Server:-(take emp table)

select top 10 sal from emp

  Was this answer useful?  Yes

Neeraj

  • Nov 7th, 2006
 

You can write the query as follows.SQL> select * from 2 (select ename,sal from emp order by sal desc) 3 where rownum<=3;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions