how to find nth highest salary

Answer Posted / abhishek singh

SELECT TOP 1 salary
FROM dbo.emp
WHERE (salary IN
(SELECT DISTINCT TOP n salary
FROM dbo.emp
ORDER BY salary DESC))
ORDER BY salary

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

New concepts of sql server 2005 use in your project.

1912


How to create percentile function?

108


Can We Use Data-grids For Our Report In Ssrs?

147


How to start sql server browser service?

561


What is the process of indexing?

518






Explain stored procedure?

603


What the different components of Replication and what is their use?

560


Write query to return all rows sql?

618


What is sql or structured query language?

683


How data can be copied from one table to another table?

513


you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation

541


What is right outer join in sql server joins?

690


What is bit data type?

626


What do you understand by SQL*Net?

614


What is dbcc command in sql server?

589