how to find the second highest salary from emp table?
Answer Posted / abhijit banik
To get the n-th highest salary from employee table in oracle-10g
--------------------------------------------------------------
select min(salary)
from
(
select rownum rn, salary
from
( select distinct(salary) from employee order by salary desc )
)
where rn<=&n+1
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Explain the order of sql statement execution?
What is flag in sql?
What is difference between db2 and sql?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
What is pl sql in dbms?
Why we use triggers in mysql?
How do I count records in sql?
Write a query to display the current date in sql?
What is trigger in pl sql?
Are subqueries better than joins?
What are % type and % rowtype?
Explain select statements in sql?
What is sql performance tuning?
How do I run a query in pl sql developer?
Is it possible to update views?