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
Do you know spatial data types - geometry and geography in sql server 2008?
What is a filestream?
Explain full-text query in sql server?
What is subquery explain with example?
How do you delete duplicate records in sql server?
Can a table be created inside a trigger?
What is an index. What are the types?
What is 3nf normalization form?
What are sql server functions?
What is the difference between upgrade and migration in sql server?
Do you know what is fill factor and pad index?
What are sql azure firewall rules?
What are the properties of the transaction?
Does any body please help me what question's have asked for SSRS in the interview?
What is the difference between ddl and dml?