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 cached report?
Does an index slow down updates on indexed columns?
What is the fastest way to permanently delete a 1 million row table named customers?
What is the difference between upgrade and migration in sql server?
Explain what is row_number function?
How to create a new login name in ms sql server?
what are constraints? : Sql server database administration
what type of index will get created after executing the above statement? : Sql server database administration
What is a mixed extent?
How to write a query with an inner join in ms sql server?
how to invoke a trigger on demand? : Sql server database administration
What are the difference between clustered and a non-clustered index?
How do I find the sql server database version?
How do I install sql server?
What are the methods used to protect against sql injection attack?