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

write a query for the fifth highest salary?

Answer Posted / piyush gupta

select distinct(a.sal) from emp a where 5=(select
count(distinct(b.sal)) from emp b where a.sal<=b.sal)


you can this query for nth highest salary
replace 5 with any number

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain database partitioning.

1074


What is the function of cluster index?

1163


What are the various ways to execute a query in teradata?

2606


What is a super key?

1037


What are different types of clusters present?

1075


Write a query to get maximum and second maximum in oracle?

1045


Explain entity ?

1028


what is rcp,if rcp disabled what happen?

2215


Differentiate between extension & intension?

1424


5. Explain about relational algebra.

2176


Explain natural key?

1124


How to do performance tunning a database in DB2 V8.2 UDB in linux

2261


Explain the record term used in database.

1071


Explain artificial key?

1168


Which is the best graph database?

950