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
Why should one not prefix user stored procedures with ‘sp_’?
how can you check the level of fragmentation on a table? : Sql server administration
What is the difference between a local and a global temporary table?
How many partitions a clustered index has by default in sql server 2012?
What is meant by datasource?
Can a table be created inside a trigger?
What are “phantom rows”?
Can you tell me about the concept of ER diagrams?
What is the filtered index?
What are different types of schemas?
How to scale out a federation by Sql statement?
Do you know sql server 2008 introduces automatic auditing?
What is rolap and its advantage? : sql server analysis services, ssas
What is unique key constraint?
What is the purpose of the master database?