write query for fourth maximum salary from employee table
Answer Posted / santhosh
;with result as
(
--use dense_rank instead of row_number or rank
select salary, DENSE_RANK() over (order by salary desc) as denserank
from Employees
)
select top 1 * from result
where denserank = 4
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain different types of lock modes in sql server 2000?
How to create an index on an existing table in ms sql server?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
what are defaults? : Sql server database administration
Where actually sql azure database is hosted?
What are audit control procedures?
Explain the various types of concurrency problem?
Explain security with sql azure?
What is a constant or literal in ms sql server?
Where the sql logs gets stored?
How many types of triggers in sql server?
To automatically record the time on which the data was modified in a table, which data type should you choose for the column?
What are the different normalization forms?
Why should one not prefix user stored procedures with ‘sp_’?
What stored by the tempdb ? : sql server database administration