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
What is replace and stuff function in sql server?
What is ddl command?
Explain what are various ways to enhance the ssrs report?
What is the sql case statement used for?
What is log cache in sql server?
Which trace flags are enabled in sql server?
what is dbcc? : Sql server database administration
What is the recovery model?
What is “asynchronous” communication in sql server service broker?
If the job running very slow what is the action you do
What is the difference between update lock and exclusive lock?
What is BLOCK statements in SQL?
What is the maximum row of a size?
What are .mdf files?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?