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

Benefits of Stored Procedures?

918


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

1024


What is collation sensitivity?

982


How to loop through returning rows?

971


where can you add custom error messages to sql server? : Sql server administration

1043


What is sql server programming?

975


What is merge statement?

1018


What is the difference between upgrade and migration in sql server?

1021


How does recursive cte works in sql server?

940


Define self join in sql server joins?

898


Do you know what is openxml in sql server?

1015


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

876


Give me any three differences between Truncate and Delete.

1040


Can primary key be null?

878


What is the difference between drop table and truncate table?

872