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


Please Help Members By Posting Answers For Below Questions

What is the data tier application?

143


Explain time data type in sal server 2008?

527


Tell me what is use of except clause? How it differs from not in clause?

490


What is the importance of three tier architecture?

580


Explain about nested stored procedure?

586






How to execute a sql statement using odbc_exec()?

542


How to create a dml trigger using create trigger statements?

537


What is the query and subquery?

592


What is subreport?

96


Explain error and transaction handling in sql server?

479


what is a join and explain different types of joins? : Sql server database administration

519


What is the difference between local and global temporary tables?

561


Why we need sql server?

534


Can the query output be sorted by multiple columns in ms sql server?

528


Write an SQL query to obtain the 2nd highest salary.

589