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

What are sql commands?

933


Describe types of sql statements?

989


What is difference between group by and partition by?

976


how to get help information from the server? : Sql dba

874


Is it possible to create startup or shutdown trigger for on-schema?

978


What does dml mean?

927


Define select, insert, create, delete, update, drop keywords

993


What is the difference between between and in condition operators?

939


What are the constraints available in sql?

994


how can we destroy the session, how can we unset the variable of a session? : Sql dba

932


what are the properties and different types of sub-queries? : Sql dba

966


How will you distinguish a global variable with a local variable in pl/sql?

1086


How to raise user-defined exception with custom sqlerrm ?

1060


Explain aggregate functions are available there in sql?

938


What is difference between db2 and sql?

935