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
Explain important index characteristics?
Can we use max in where clause?
What are the parts of a function?
What is difference between commit and rollback when used in transactions?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
What is a trace frag?
in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration
What is fill factor and pad index?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
How you can get a list of all the table constraints in a database?
What are the different types of sub-queries?
What is indexing a document?
What is command parameter in ssrs?
Are connections to sql server encrypted?
Which is better statement or preparedstatement?