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
How many types of triggers are there?
Does a server store data?
Write an SQL query to obtain the 2nd highest salary.
Explain important index characteristics?
What is auditing in sql server?
Explain different types of locks in sql server.
Distinguish between nested subquery and correlated subquery?
What are the different acid properties?
What is an execution plan? When would you use it?
What is a full text index?
How do I open a .db file?
Write a SQL queries on Self Join and Inner Join.
What is the parse query button used for?
What is scalar user-defined function?
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration