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
can a database be shrunk with users active? : Sql server administration
Can a table be moved to different filegroup?
How to view the error log for any specific instance? : sql server database administration
Can you explain powershell included in sql server 2008?
What are the results of running this script?
Give some Scenario for Non Clusterd index? Can we write system defined functions in side The Function? Wat is the Unique Datatype?
What is 2nf normalization?
What is a collation?
How to maintain a fill factor in existing indexes?
How many levels of sp nesting are possible?
What is implicit mode in sql server?
We need to perform what steps in the following order to work with a cursor?
Do you think BCNF is better than 2NF & 3NF? Why?
How to retrieve error messages using odbc_errormsg()?
How do I create a stored procedure in sql server?