Anybody can tell me, how do we find second largest emp
salary from emp table.. Thanks in advance ...

Answer Posted / hemalatha

Following is the query to find the nth maximum salary:

select * from emp
where sal=(select distinct(sal) from emp a
where &n=(select count(sal)from emp
where sal>=a.sal;))

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between postgresql and oracle?

503


What is the difference between count (*), count (expression), count (distinct expression)?

556


How to check your oracle database 10g xe installation?

577


Difference between varchar and varchar2 data types?

658


How to list all indexes in your schema?

577






What is a server parameter file in oracle?

587


What suggestions do you have to reduce the network traffic?

540


How many categories of data types in oracle?

601


What is the minimum client footprint required to connect c# to an oracle database?

562


Please explain oracle data types with examples?

584


How to load data from external tables to regular tables?

536


What are the different pseudo commands? Explain in general?

539


What are the uses of linked server and explain it in detail?

584


How to create an oracle database?

577


Give the different types of rollback segments.

573