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
Which operator is used in query for pattern matching?
Does normalization improve performance?
How do you optimize a stored procedure in sql?
What is the use of & in pl sql?
What is string join?
What is user in sql?
What are the uses of sysdate and user keywords?
What is a primary key example?
What are the main features of cursor?
What are the advantages of normalization?
How can one get sql*loader to commit only at the end of the load file? : aql loader
How can you get sql*loader to commit only at the end of the load file? : aql loader
Is inner join same as self join?
Can we use loop in sql?
What are different types of tables in sql?