how to select second mauximum value in a given table under salary column

Answer Posted / utkal

Select distinct(E1.Salary) from EMPLOYEE E1 where 2 =
(Select Count(distinct(E2.Salary)) from Employe E2 where
E1.Salary <= E2.Salary).

Here n=2,

Similarily we can find the 5th highest salary etc...

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use "in out" parameter properly?

612


how to handle exceptions in post production

944


What is Virtual Private Database in Oracle?

616


Explain about achiever in sql?

582


Give the different types of rollback segments.

578






How to use subqueries in the from clause in oracle?

579


What is a data dictionary and how can it be created?

613


Write a syntax for update query in oracle?

614


How to download oracle database 10g xe?

597


How to specify default values in insert statement using oracle?

556


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1434


What is merge statement used for?

565


Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?

1507


Explain the difference between a procedure and a function? What do you understand by those terms?

620


How to retrieve data from an cursor to a record?

559