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
What is log cache in sql server?
What stored procedure would you use to view lock information?
Mention the differences between substr and charindex in sql server.
What are the differences between sql server and mysql.
Explain error and transaction handling in sql server?
What is a schema in ms sql server 2005?
What is difference between rownum and rowid?
What are distributed partitioned views?
What is lookup override?
What is database architecture? : SQL Server Architecture
Explain differentiate between a having clause and a where clause?
Does the order of columns in update statements matter?
Describe in brief system database.
Does an index slow down updates on indexed columns?
What is Federation and Federation Member?