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
Explain the use of keyword with encryption. Create a store procedure with encryption?
What is row-level compre?
Explain transaction server consistency?
Can foreign key be deleted?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
Define model database?
What is the full form of ddl?
Does union all remove duplicates?
what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration
What is the purpose of forms?
Explain transaction server distributed transaction?
Do you know the cursor optimization tips?
Why transaction is important?
What is the user of Primary key?
What is a primary key?