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 / usha

SELECT EmpName, Salary
from
(
SELECT EmpName, Salary, Row_Number() OVER(ORDER BY SALARY
DESC) AS 'Salaries'
FROM #Employees
) emp
WHERE Salaries = n

n may be 2,3....

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why should one not prefix user stored procedures with ‘sp_’?

1053


how can you check the level of fragmentation on a table? : Sql server administration

990


What is the difference between a local and a global temporary table?

1129


How many partitions a clustered index has by default in sql server 2012?

1097


What is meant by datasource?

932


Can a table be created inside a trigger?

976


What are “phantom rows”?

1668


Can you tell me about the concept of ER diagrams?

1091


What is the filtered index?

1069


What are different types of schemas?

950


How to scale out a federation by Sql statement?

116


Do you know sql server 2008 introduces automatic auditing?

991


What is rolap and its advantage? : sql server analysis services, ssas

1291


What is unique key constraint?

1068


What is the purpose of the master database?

1139