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

What is the difference between primary key, foreign key and candidate key?

1115


Which three commands cause a transaction to end?

1069


What do you mean by foreign key and primary key?

1043


Explain the record term used in database.

1085


WHAT IS NEED BY METION DATFMT AND TIMFMT IN H-SEPICITION IN RPGLE?

2976


What is the importance of database partitioning?

1063


A lowest level of security by most RDBMS is

1180


Explain the table term used in database.

1048


What is a database connection string?

1128


Why merge statement is used inside the database?

1108


What is aws documentdb?

1058


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

1055


List the properties of a transaction.

1062


What is a database string?

952


What do you mean by database?

1092