write the query for find the top 2 highest salary in sql
server
Answer Posted / neeraj sharma
select ename,sal from emp where rownum<=3 order by sal desc
Note:- every table has rownum column but it is hidden by
default you can see it by this
select rownum from your_table_name
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is normalization and its types?
Where cross join is used?
what is sql server? : Sql server database administration
How can you set the threshold at which sql server will generate keysets asynchronously?
What is the difference between commit and rollback?
How to find the second highest salary of an employee?
How to specify the collation for a character data type in ms sql server?
What are the restrictions that views have to follow? : SQL Server Architecture
what do you understand by change data capture?
What is a deadlock and what is a live lock?
Explain multiserver query
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas
What is a partition function in sql server?
How to write a query with a left outer join in ms sql server?
Where is localdb stored?