find out the second highest salary?

Answer Posted / mahesh

We can use an OLAP function
select * from
(select ename,sal,dense_rank() over(order by sal desc)
rankings from emp ) a
where a.rankings = 2;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

1738


What do you mean by merge in oracle?

591


How to use "in" parameter properly?

617


How do you tell what your machine name is and what is its IP address?

1516


How to export your own schema?

572






What is the order of defining local variables and sub procedures/functions?

599


What is the scope of a local variable?

585


How to export several tables together?

567


What is oracle rowcount?

578


We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.

4930


Which is better Oracle or MS SQL? Why?

3974


What are the differences between date and timestamp in oracle?

551


Describe the types of sub query?

552


Can multiple columns be used in group by in oracle?

546


What are the varoius components of physical database structure of oracle database?

567