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 check database size in Oracle?
what is the use of system.effective.date variable in oracle?
What are the different types of partitions in oracle?
How to add a new column to an existing table with a default value?
What is a connect identifier?
What happens in oracle commit?
What is the difference between online and offline backups?
How to loop through data rows in the implicit cursor?
What is the maximum limit on the number of columns in a table?
How to list all indexes in your schema?
what are the advantages of running a database in archive log mode?
How to convert csv to table in oracle?
How would you change old and new values in an insert, delete and update triggers?
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
Explain an extent?