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
What are the properties of the relational tables?
Why is replication required on the sql server?
Can a rule be bound to any column of any data type?
Which tools are available to manage SQL Azure databases and servers?
What is the difference between a check constraint and a rule?
What is the use of toad or sqldbx.?
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What is read uncmmited?
What does it mean to invest in the index?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
Do I need a report server to run reports in my application?
Define normalisation?
In case you have filters in your report, when filters will be applied in cached report instance?
What is a group function explain with an example?