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
Do you know the cursor types?
How secure is sql server database?
what is raid? : Sql server database administration
Explain about sql server login?
What do you mean by cardinality?
Suggest a method of joining two tables.
What are the disadvantages of primary key and foreign key in SQL?
What is lock escalation and what is its purpose?
How to enter unicode character string literals in ms sql server?
how to determine the service pack currently installed on sql server? : Sql server database administration
How to delete duplicate rows from table except one?
How can I get data from a database on another server?
What is nonclustered index on computed columns?
How to create a large table with random data for index testing in ms sql server?
List out the differences between the clustered index and non-clustered index in sql server?