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
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
What are group functions in query statements in ms sql server?
What Is Rdbms?
What is GUID in sql server?
How to create database with physical files specified in ms sql server?
How do I start sql server?
What are the transaction properties?
What is a scheduled job or what is a scheduled task?
When we should use @@error?
What are the differences between union, intersect, and minus operators?
How many non clustered indexes there can be on table ?
What is database architecture? : SQL Server Architecture
What type of Index will get created after executing the above statement?
What does normalization do to data?
Explain syntax for disabling triggers?