write the query for find the top 2 highest salary in sql
server

Answer Posted / suhail qaiser

or if u want 2nd highest then write this query

select Top 1 salary from ( select top 2 salary from
emp_table order by salary desc)temptable order by salary
asc.

Is This Answer Correct ?    29 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain go command in sql server?

552


What is microsoft sql server?

546


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

662


How do use Having,Group by,Group function in SQL?

1362


What is your recommendation for a query running very slow? : sql server database administration

595






How do you drop an index?

507


How to write a query with a right outer join in ms sql server?

490


Do you know what are pages and extents? : SQL Server Architecture

570


What is the significance of master, tempdb and model databases?

535


What number aggregate functions are accessible there in sql?

597


How to rename an existing column with sql server management studio?

510


What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas

556


What do you mean by an execution plan? Why is it used?

541


Where are SQL server users names and passwords are stored in sql server?

726


If no size is defined while creating the database, what size will the database have?

556