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

How to create a stored procedure in oracle?

577


defination of bitmap index

1631


How to execute the package in oracle?

573


What are internal user account in oracle?

571


How to assign a tablespace to a users in oracle?

591






How to login to the server without an instance?

623


What is a user role in oracle?

616


How to create a temporary table in oracle?

694


How do you bind variables in oracle?

551


how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?

1831


How to update values on multiple rows in oracle?

602


How to rename a tablespace in oracle?

622


What is a table in oracle?

545


What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

1608


Explain about your project and its relation to the current job position you are applying to?

546