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 add more data to the testing table in ms sql server?
How to implement service broker?
Which database stores information about replication?
What happens if the update subquery returns no rows in ms sql server?
What is a database table?
How can we determine what objects a user-defined function depends upon?
How to find out what is the default collation in a database?
Explain what is meant by replication of database?
Define full outer join in sql server joins?
What is the maximum size of sql server database?
Do you know what are the differences between lost updates and uncommitted dependencies?
Can sql servers link to other servers like oracle?
Where are full-text indexes stored?
What are the types of subscriptions in SQL Server replication?
What are the types of database schema? : sql server analysis services, ssas