find out the third highest salary?
Answer Posted / harmeet
Hi, this query will gives the third highest salary from table
select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);
To dispay 5th highest salary, just change the number 3 to 5.
Like that we can find top N salaries.
I hope i'm not wrong.
Is This Answer Correct ? | 44 Yes | 16 No |
Post New Answer View All Answers
What is the difference between post-database commit and post-form commit?
interview questions with answer for cts
How to create a table interactively?
How to write text literals in oracle?
How translate command is different from replace?
How to create a testing table in oracle?
Why use resource manager in Oracle?
How to retrieve values from data fields in record variables?
What are the set operators union, union all, minus & intersect meant to do?
What is Library Cache in Oracle?
What is an oracle tablespace?
Explain the difference between sap and oracle?
Explain database link?
How to view all columns in an existing table?
What is the exact use of Collections?