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
Explain about sql server login?
What is the difference between clustered and non-clustered indexes in ms sql server?
Do you know what is user defined datatypes and when you should go for them?
Do you know the cursor optimization tips?
Can you index views?
How to enter unicode character string literals in ms sql server?
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What do you mean by normalisation?
Can group functions be used in the order by clause in ms sql server?
Can the query output be sorted by multiple columns in ms sql server?
What is analysis service repository?
What is the default fill factor value?
Can you explain about buffer cash and log cache in sql server?
What is multilevel indexing?
Explain the difference between functions and stored procedures in sql server?