how to find nth highest salary

Answer Posted / lakshmi reddy

To get nth highest salary from Employee table:
select * from Employee e where n=(select COUNT(distinct sal)
from Employee e2 where e2.Sal>e.Sal)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are drillthrough reports?

114


What is optimistic concurrency?

640


What is difference between inner join and full join?

662


What is statement level trigger?

645


What do you mean by the term 'normalization'?

763






Explain about sql server login?

690


difference between Clustered index and non clustered index ?

672


Explain system functions or built-in functions? What are different types of system functions?

655


What are the general features of sql server management studio? : sql server management studio

670


What to perform pattern match with the like operator?

564


What does it mean to normalize data?

590


what are acid properties? : Sql server database administration

574


Why use “in” clause in sql server?

638


Can you pass expressions to function parameters?

625


Do you know what guidelines should be followed to help minimize deadlocks?

629