How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / aditya kumar bisoi
SELECT EmpId,Salary
FROM(SELECT ROW_NUMBER() OVER(ORDER BY Salary Desc) AS [ROW_NUMBER],* FROM (SELECT DISTINCT Salary,Empid FROM EMPDetails)Emp)Emp1
WHERE ROW_NUMBER BETWEEN 2 AND 5
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is “asynchronous” communication in sql server service broker?
Should you normalize audio?
How to get a list all databases on the sql server?
what is database replication? : Sql server database administration
What is a dataset and what are the different types of datasets?
Are all views updatable ?
Is null vs coalesce?
What is the Control Flow in SSIS
What are temporal tables in sql server 2016?
How to create function with parameter in sql server?
How to compare the top two records using sql?
What are the reporting services components?
What is linked report?
what protocol both networks use? : Sql server database administration
what are different types of backups available in sql server? : Sql server database administration