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
Is full outer join same as cross join?
How do you clear the screen in sql?
Is sql sequential or random?
What are the types of triggers in sql?
How many disk partitions should I have?
What does the base_object_type column shows in the user.triggers data dictionary view?
Is sql considered coding?
Why should I use postgresql?
Is the primary key an index?
what is the difference between $message and $$message? : Sql dba
Can a foreign key be a duplicate?
What is the difference between count 1 and count (*) in a sql query?
What is a loop in sql?
What is the difference between a primary key and a unique key?
What is the purpose of a secondary key?