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 get employee name from employee table which is the
fiveth highest salary of the table

Answer Posted / a g srikanth

Dear Shiv Shankar
There is a small mistake in your query

Select Salary From Employee a Where 5=(
Select Count(Distinct Salary) From Employee b
Where a.Salary <= b.Salary )

the correct one should be

Select Salary From Employee a Where 5=(
Select Count(Distinct Salary) From Employee b
Where a.Salary >= b.Salary )

please check it...

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of function in sql?

1090


How can we optimize a sql query?

1047


what is offset-fetch filter in tsql? : Transact sql

944


What are sql constraints?

1172


Can we join tables without foreign key?

958


Why is sharding used?

993


What is database white box testing and black box testing?

1107


How do I quit sql?

952


What are all the different types of indexes?

1147


What are the different ways to optimize a sql query?

945


what is bdb (berkeleydb)? : Sql dba

1030


How do you clear the screen in sql?

1064


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2017


How many times can we commit in a loop?

1015


What is rollback?

1110