how to find nth highest salary

Answer Posted / aravinda

try with this query you will get desired position salary.


Select Salary From Employees a Where 1=(
Select Count(Distinct Salary) From Employees b
Where a.Salary <= b.Salary );

just replace where clause number for desired position. ,2,3,4

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain transaction server distributed transaction?

595


How can you ensure that the database and sql server based application perform well?

721


What are a scheduled jobs or what is a scheduled tasks?

570


Explain what is use of dbcc commands?

599


What are the advantages of passing name-value pairs as parameters?

741






What samples and sample databases are provided by microsoft?

671


How to encrypt Strored Procedure in SQL SERVER?

642


What are examples of triggers?

708


Is sql server free?

599


What is temporal data type?

591


Does sql server use java?

620


What is exporting utility?

619


Can you import Microsoft Excel data to SSRS?

98


What is ms sql server service broker?

584


What is sql server agent and what are the two modes of authentication in sql server?

660