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 find nth highest salary

Answer Posted / anand patel.

It is a very generic and easy way to find the Nth higest
salary with there employee/s name.

select * from emp where salary =
(select max(salary) from emp where salary in
(select top (select (count(*)-(n-1))from emp) salary
from emp order by salary))

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert numeric values to integers in ms sql server?

1104


What is the difference between cartesian product and cross join?

872


What are the character string functions supported by sql server 2005?

1024


What is a transact-sql statement batch in ms sql server?

1033


What happens if time-only values are provided as date and time literals?

1023


What is global temp table?

1007


How to declare and use cursor variables?

1186


What is xdr?

998


Explain what is the difference between union and union all?

1022


What is a partitioned view?

1009


What is the use of attributehierarchyvisible ? : sql server analysis services, ssas

1078


can an automatic recovery be initiated by a user? : Sql server administration

966


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

960


How to get the query of a table in sql server?

908


What is extended stored procedures?

971