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 / kiran
select empid,salary
from (select distinct empid,salary,
Dense_Rank() over(order by salary desc) as Rank
from dbo.EmpSalary) b
where b.rank=3
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What the class forname () does?
How do I view a script in sql server?
How to get the definition of a trigger back?
What is difference between primary key and foreign key?
What do you mean by subquery?
What is "scheduled jobs" or "scheduled tasks"?
How to convert a unicode strings to non-unicode strings?
What is system stored procedures?
What is an indice?
According to you what goes into making the best database administrator? : sql server database administration
How to create a dynamic cursor with the dynamic option?
How do I clean up sql server transaction log?
What is reportserver and reportservertempdb ?
What is the difference between function and stored procedure in sql server?
Will count(column) include columns with null values in its count?