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 control file used for?
Difference between the “verify” and “feedback” command?
How to connect to oracle using service name instead of sid?
What is ADDM Advisor in Oracle?
What is oracle host variable?
Explain an extent?
Can multiple columns be used in group by in oracle?
What is bulk collect in oracle?
What is an Oracle index?
Write a trigger example in oracle?
State all possible different index configurations a table can possibly have?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
Explain the difference between sap and oracle?
List the parts of a database trigger.
How to write an inner join with the where clause in oracle?