how to find nth highest salary

Answer Posted / amarjit singh

--display 3rd higest salary in MSSQLSERVER
select max(sal) from emp
where sal <(select max(sal) from emp
where sal <(select max(sal) from emp
))

--By , STUDENT OF IET BHADDAL ENG COLLEGE

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I create a report based on a query? : sql server management studio

560


Can binary strings be used in arithmetical operations?

524


What is the difference between stored procedure and user defined functions?

625


Can you tell me some of the common replication dmv's and their use? : sql server replication

537


New concepts of sql server 2005 use in your project.

1910






Explain the different types of backups available in sql server? : sql server database administration

520


What is @@error in sql?

623


Tell about MOM Tool(Microsoft Operator Manager)?

1413


What is #table in sql server?

537


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

502


What causes index fragmentation?

578


what changed between the previous version of sql server and the current version? : Sql server database administration

520


Do you know the isolation level that sql server support?

528


what is a transaction? : Sql server database administration

473


What do you need to connect php to sql server?

543