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

Answer Posted / ram murthy

SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 2 salary FROM
employee ORDER BY salary DESC) a ORDER BY salary

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 create command?

522


How to check if stored procedure is running in sql server?

479


Difference between aggregate functions of sql?

651


Is it possible to have clustered index on separate drive from original table location?

513


What is table level trigger?

581






How does a profiler work?

512


Which command is used for user defined error messages?

558


1 01 101 01010

1563


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

548


What are the High-Availability solutions in SQL Server and differentiate them briefly?

698


How many types of dimensions are there and what are they? : sql server analysis services, ssas

560


How to find index size for each index on table?

583


What are database states in ms sql server?

646


what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration

516


What is the difference between for auto and for nested?

506