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 difference between composite index and covering index?
Can one drop a column from a table?
Tell me what are cursors and when they are useful?
What is dbcc? Give few examples.
How do I find the transaction log size in sql server?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
what is memory-optimized nonclustered indexes
What is the maximum size of sql server database?
Explain primary key in sql server?
What stored by the model?
Mention what are the different types of ssrs reports?
Can two different columns be merged into single column? Show practically?
How to execute a sql statement using mssql_query()?
1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?
Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?