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 / vijay saxena

SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP 3 salary
FROM tblSalary
ORDER BY salary DESC)

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is fill factor and pad index?

745


What is difference statement and preparedstatement?

719


How to test subquery results with the exists operator?

745


What is query and its types?

683


Is truncate autocommit?

715






What are rows and columns?

717


How do you implement session management in SQL Server mode?

718


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

847


How to sort query output in descending order in ms sql server?

745


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2334


Explain about Joins?

764


What are the types of joins in sql?

769


What is trigger and different types of Triggers?

805


What is difference between global temporary tables and local temporary tables?

878


Explain about sql server login?

774