find out the third highest salary?
Answer Posted / amitabh sharma
Here are 2 queries for finding 3rd highest salary:
select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);
SELECT * FROM
(
SELECT Ename, SAL, dense_Rank() OVER (ORDER BY SAL DESC )
RANKNEW FROM EMP)
WHERE RANKNEW = 3
Regards,
Amitabh Sharma
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
How to define a sub function?
Is oracle a language?
How to turn on or off recycle bin for the instance?
How to connect to the server with user account: sys?
Why is oracle used?
Give the different types of rollback segments.
How to experiment a data lock in oracle?
Calculate difference between 2 date / times in oracle sql?
What is a relational database management system?
What is define in oracle?
How to unlock the sample user account in oracle?
What to do if the binary spfile is wrong for the default instance?
How to omit columns with default values in insert statement in oracle?
How to retrieve data from an cursor to a record?
Respected sir, Please send me technical questions related to oracle apps..