write the query for find the top 2 highest salary in sql
server
Answer Posted / tanay chaudhary
select * from(select emp.*,Dense_Rank() over(order by salary desc) as ranking from emp)as e where e.ranking in(1,2)
//emp=table name
//salary=column name
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is an index? : Sql server database administration
What stored by the model?
What are the different authentication modes in sql server?
What is msdb database? : SQL Server Architecture
What is the purpose of a table?
What is the difference between Normalization and De-normalization?
Explain the various types of concurrency problem?
What action plan is preferred if sql server is not responding?
What are views used for?
Can we call future method from queueable?
Explain what is public role in sql server?
what types of replication are supported in sql server? : Sql server database administration
What happens if you delete a table that is used by a view?
define and explain the differences between clustered and non-clustered indexes.
What are the restrictions while creating batches in sql server?