find out the third highest salary?

Answer Posted / suresh kumar

Hi every body,

I give the standard format Query for this type of top most
and who are the top n people in the organization like that

If we take EMP table

Select * from EMP A where &n= (select count (distinct
(sal)) from EMP B where B.sal>A.sal)

If we give n value 1 or 2 or 3….etc then we gets top one,
top second, and top third person details.

This same query can we use top n people who are earning
maximum salaries in the Organization

Select * from EMP A where &n> (select count (distinct
(sal)) from EMP B where B.sal>A.sal)

Is This Answer Correct ?    38 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain view?

593


Does facebook use oracle?

589


What happens if you set the sga too low in oracle?

571


What is connection pool in oracle?

570


What are the execution control statements?

632






What are the predefined tablespaces in a database?

564


How to install oracle database 10g xe?

579


What is varray?

597


what happened to the global index when I truncate the data in one of the partition?

1530


What is PL/SQL ?

1129


How to set up autotrace for a user account?

604


Describe the types of sub query?

567


How to convert characters to numbers in oracle?

602


What is where clause in oracle?

542


What is an oracle user role?

582