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
How to work with data objects interactively?
What are the common oracle dba tasks?
What is pragma autonomous transaction in oracle?
master table and child table performances and comparisons in Oracle ?
What is bulk copy or bcp in oracle?
What is the difference between Delete, Truncate and Drop in Oracle?
How to update values on multiple rows in oracle?
How to use like conditions in oracle?
Difference between cartesian join and cross join?
How to sort the query output in oracle?
What is difference between sid and service name in oracle?
query optmization techniques and quwry analyser+projects+ppts
What are the different types of modules in oracle forms?
How to get execution statistics reports on query statements?
Can we create trigger on materialized view in oracle?