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
How to change the name of a database user?
How to create and drop temp table in sql server?
What are the extra roles available in msdb? : sql server security
What’s the use of custom fields in report?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
How many ways to create table-valued functions?
explain different levels of normalization? : Sql server database administration
What is the stuff?
what is the difference between count(*) and count(1) ?
Can a table be moved to different filegroup?
Explain about system stored procedure?
How to write a query with a left outer join in ms sql server?
How to include date and time values in sql statements?
How to find related tables in sql server?
Explain the first normal form(1nf)?