how to find nth highest salary

Answer Posted / babu

select * from emp e where &num=(select count(distinct(sal))
from emp b where b.sal>=e.sal)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are subquery and its properties?

643


What is a raid and what are different types of raid configurations?

736


Can I use sql azure as a backup with log shipping or database mirroring?

140


How to scale out a federation by Sql statement?

104


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

636






What is stretch database in sql server?

655


What is reportserver and reportservertempdb ?

116


What is a data collection table?

630


How to rebuild indexes with alter index ... Rebuild?

677


Is it possible to replicate data from sql server to oracle? : sql server replication

653


What is difference between count (*) and count column?

595


what is the difference between Tabular and Matrix report?

130


How to check parameter value in stored procedure sql server?

562


What are page splits?

670


Explain the difference between cross join and full outer join?

586