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 self contained sub query?
How to find the source of a table in sql server?
How to turn off warning messages during php execution?
What are indexers?
What is a db view?
How to get all stored procedures in sql server?
What are the dmvs?
What is the Main Difference between ACCESS and SQL SERVER?
How to verify a user name with sqlcmd tool?
Describe in brief system database.
Is sql server 2016 free?
How to use old values to define new values in update statements in ms sql server?
What do you understand by user-defined function in the sql server?
How to download and install microsoft .net framework version 2.0?
What is the current pricing model of SQL Azure?