select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.
Answer Posted / shekhar
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP 3 salary
FROM tblSalary
ORDER BY salary DESC) S
ORDER BY salary
| Is This Answer Correct ? | 23 Yes | 4 No |
Post New Answer View All Answers
How to create a dynamic cursor with the dynamic option?
What is role playing dimension with two examples? : sql server analysis services, ssas
Does partitioning improve performance sql server?
What is raid and what are different types of raid levels?
Is it possible to create trigger on views?
List some advantages and disadvantages of stored procedure?
Do you know what is difference between index seek vs. Index scan?
Explain partitioned view?
What do you know about normalization and de- normalization?
mention different types of relationships in the dbms?
What are sql dirty pages?
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
Do you know what is normalization of database? What are its benefits?
How would you use user_constraints table in DB?
How to generate create function script on an existing function?