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 a non equi join?
Explain a checkpoint?
How to call stored procedure using http soap?
What is report snapshot in ssrs?
What types of replication are supported in sql server?
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
How can you know if the row fetched from cursor is still valid in underlying table?
How to create a simple user defined function in ms sql server?
Can we call future method from queueable?
How to rebuild all indexes on a single table?
Explain what is scheduled job and how to create it?
Which tcp/ip port does sql server run on? How can it be changed?
List the advantages of using stored procedures?
What are sql azure firewall rules?
What is oltp (online transaction processing)?