how to find nth highest salary
Answer Posted / lakshmi reddy
To get nth highest salary from Employee table:
select * from Employee e where n=(select COUNT(distinct sal)
from Employee e2 where e2.Sal>e.Sal)
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How to use values from other tables in update statements in ms sql server?
What is a transaction and why is it important?
What is order of B+tree?
What is row_number () and partition by in sql server?
What do you understand by mirroring and mention the advantages of the mirroring?
What are the Advantages of using CTE in sql server?
What is similarity and difference between truncate and delete in sql?
What is sql injection and why is it a problem? : sql server security
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
you have couple of stored procedures that depend on a table you dropped the table and recreated it what do you have to do to reestablish those stored procedure dependencies?
What are the differences between char and varchar in ms sql server?
What do you mean by 'normalization'?
Explain what are the authentication modes in sql server?
What is sqlservr.exe - process - sql server (sqlex?press)?
What are dml (data manipulation language) statements in ms sql server?