find out the second highest salary?
Answer Posted / hari kanth
select sal from(select sal,rank() over(order by sal desc)
rnk from emp) e
where e.rnk=2;
(OR)
select rownum,sal from emp group by sal,rownum
having rownum=2;
(OR)
select rn,sal from( select rownum rn,sal from emp group by
sal,rownum order by sal desc)
where rn=2;
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
20. Using a set operator, display the client number of all clients who have never placed an order.
How to start instance with a minimal initialization parameter file?
What is backup in Oracle?
How to rebuild an index in oracle?
What is key preserved table?
Explain the use of rows option in imp command.
What is execute immediate in oracle?
What is primefaces used for?
How to delete multiple rows from a table in oracle?
What are the different types of modules in oracle forms?
How do we get field detail of a table?
What privilege is needed for a user to delete rows from tables in another schema?
How are extents allocated to a segment?
What is user managed backup in Oracle?
How do I learn what codesets are available in oracle?