find out the third highest salary?
Answer Posted / sudheer
Guys Few of you have submitted an optimal query.
select distinct sal from emp A where 3 = (select count(sal)
from emp B where a.sal > b.sal)
However the integer 3 will not give the third highest salary
as expected. Point should be noted that the row starts with
zero.
so the actual result will the fourth highest salary with the
above query.
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
How to open and close an explicit cursor in oracle?
What is a dead lock in oracle?
What is oracle open database communication (odbc)?
What is a database table in oracle?
State and explain the different types of data models?
How to start an oracle instance?
Please explain oracle left join with an example?
What is sequence?
What is data file?
Explain an extent?
What are a cluster and non-cluster index?
How to use group functions in the select clause using oracle?
What is a schema in oracle?
What is the difference between "as" and "is" in an oracle stored procedure?
What do you mean by group by clause?