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 is the usage of sign function?
What is etl - extraction, transformation, and loading?
Explain Normalization and DE normalization
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
please differentiate between delete and truncate?
What happens to a trigger with multiple affected rows?
What are different types of views?
What options are available to audit login activity? : sql server security
Where do we use trace frag?
What are the common performance issues in sql server?
which backup strategy you are following at ur company
Why are you getting errors when creating a new odbc dsn?
What are subquery and its properties?
Can you roll back the ddl statement in a trigger?
What is the sql server 2000 version number?