find out the third highest salary?

Answer Posted / amrish singh

this is the query for retrieving nth highest salary from
table emp
select e.sal
from emp e
where n-1=(select count(*) from emp s where s.sal>e.sal)

putting the value of n we get the required result.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)

1807


What is rowid and rownum in oracle?

541


Can we protect our pl/sql source code?

572


How to create an oracle testing table?

591


How do you tell what your machine name is and what is its IP address?

1516






What is bulk load in oracle?

591


What is BBED in Oracle?

685


Explain the use of control file?

654


What is not equal to in oracle?

526


Can we save images in a database and if yes, how?

590


Can multiple columns be used in group by in oracle?

544


How to call a sub procedure?

562


How to use windows user to connect to the server?

530


What are the differences between interval year to month and interval day to second?

550


Difference between cartesian join and cross join?

543