how to find nth highest salary
Answer Posted / nitin munjani
Using Row_Number() function
Here N refers the Nth highest salary
select empid,empname from mstemployee where empsalary in (
(select empsalary from
(select Row_Number() over(order by empsalary desc)
rownm,empsalary from mstemployee
group by empsalary) o where rownm=N))
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a trigger in sql server?
What is an expression in ms sql server?
What is a matrix in ssrs?
What is indexed view? How to create it?
What is the difference between a local and a global temporary table?
Do you know what are the properties of the relational tables?
What are system databases into sql server (2005/2008) : sql server database administration
What is the New in SQL server 2008?
What is difference between table aliases and column aliases? Do they affect performance?
What is change data capture (cdc) in sql server 2008?
How to create a large table with random data for index testing in ms sql server?
What do you mean by recursive stored procedure?
How to download microsoft sql server 2005 express edition?
Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication
How to set the current database in ms sql server?