how to find nth highest salary
Answer Posted / rahul tripathi
The Genral answer which can work on any SQL:-
select salary from emp e1 where (n-1)=(select count(*)
from emp where salary > e1.salary )
Rahul Tripathi
rahultripathi@inkanpur.com
Is This Answer Correct ? | 249 Yes | 76 No |
Post New Answer View All Answers
What do you mean by sql server 2005 express management tools?
Where in ms sql server is ’100’ equal to ‘0’?
How can delete duplicate records in cte in sql server?
What is difference between clustered and non clustered index?
How to encrypt Strored Procedure in SQL SERVER?
What is BCNF? How is it better than 2NF & 3NF?
write an SQL query to list the employees who joined in the month of January?
What is difference between rownum and rowid?
What are the filtered indexes?
What is the difference between functions and stored procedures?
What is a mixed extent?
Can group functions be mixed with non-group selection fields in ms sql server?
How to find the version of sql server? : sql server database administration
What is global temp table?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?