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
Explain boyce and codd normal form(bcnf)?
What is a trigger and types of a trigger?
Write a query to find 5th highest amount paid from the customer table.
Which sql server is best?
What are the characteristics of modern DBMS?
What is the difference between delete and truncate statements?
Explain the various types of concurrency problem?
What is Extended user-defined?
What is a dataset and what are the different types of datasets?
How many clustered indexes there can be on table ?
Explain the difference between function and stored procedure?
Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication
How to apply filtering criteria at group level with the having clause in ms sql server?
What is correlated subquery in sql server?
Can coalesce return null?