how to find nth highest salary
Answer Posted / amit kumar
--- Getting 4th highest salary
--- 4 can be replaced with any number
with EmpSal as
(Select *, row_number() over (order by EmpSal Desc)
as 'rownumber' from employee)
Select * from EmpSal where rownumber =4
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why I have to use stored procedures?
How can you tell if a database object is invalid?
What is a natural primary key?
What are difference between Cluster index and Non-Cluster index?
What are the difficulties faced in cube development? : sql server analysis services, ssas
How to query multiple tables jointly?
IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do
What is a bit datatype?
Explain tablesample?
What is the difference between dropping a database and taking a database offline?
What are the differences between clustered and non-clustered index?
What are partitioned views?
Can you explain about buffer cash and log cache in sql server?
Why can there be only one clustered index and not more than one?
Explain what stored procedure sp_replcounters is used for? : sql server replication