Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What happens if the update subquery returns multiple rows?

1115


Explain a private synonyms?

1034


What is truncate oracle?

971


Name the various constraints used in oracle?

1016


How to export data with a field delimiter?

1037


Is oracle a programming language?

985


What are the differences between char and varchar2 in oracle?

1166


How to use subqueries with the in operator using oracle?

1089


In oracle there is column command, how will you explain that?

1049


what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?

2465


Explain about achiever in sql?

1032


Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

2059


What is the oracle implicit cursor?

1058


What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.

1103


What happens to indexes if you drop a table?

1169