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

Does sql require a server?

1007


what is the functionality of the function htmlentities? : Sql dba

951


Is merge a dml statement?

977


How do I enable sql encryption?

1028


what are the advantages of sql ? : Sql dba

1058


Why self join is used in sql?

974


Which is faster count (*) or count 1?

1030


What is percent sign in sql?

1281


What is dialect in sql?

942


What is fmtonly in sql?

1079


What does select count (*) mean in sql?

1016


what is a stored procedure? : Sql dba

1127


How do I make my sql query run faster?

941


What is sql keyword?

998


Which is better join or subquery?

1136