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...

how to findout the 100th maximum salary

Answer Posted / srinu

Hi Jyothi,

The below q uery is suitable for Nth max salary....

SELECT a.sal
FROM emp a
WHERE &N=(SELECT COUNT(DISTINCT b.sal)
FROM emp b
WHERE a.sal<=b.sal);
In the above query u can substitute any value like 1,2,..100 etc instead of &n.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can one get sql*loader to commit only at the end of the load file? : aql loader

1059


What are the parts of a sql statement?

1090


What does rownum mean in sql?

1027


What is lookup table in sql?

1049


what are different types of collation sensitivity? : Sql dba

1067


What are the different types of triggers?

1137


Why is a primary key important?

1044


What is a sql select statement?

1041


Do we need to rebuild index after truncate?

1035


How many sql statements are used? Define them.

1039


how to include numeric values in sql statements? : Sql dba

1101


What is the use of nvl function?

1198


How is debugging done?

981


List out the acid properties and explain?

953


Why do we use set serveroutput on?

966