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 is table value parameters (tvp)?

541


what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration

538


What are cursors in ms sql server?

595


What is schemabinding a view?

532


Tell me what are cursors and when they are useful?

511






where the connection string store in the database

1528


What is rtm version in sql server?

525


Explain what is sql server english query?

532


what is the Ticketing tool used in Wipro technologies at Bangalore...???

7476


Give an example of SQL injection attack ?

570


Characterize join and name diverse sorts of joins?

532


What is SQL Azure?

85


What are diverse clauses that form a part of sql?

599


what's the difference between delete table and truncate table commands? : Sql server database administration

484


What is precedence constraint?

546