Please get the 4 th maximum salary from a table without
using any sql keyword (TOP,MAX are mot allowed)
Answer Posted / v rajkumar
select salary from Emp a where 4 = (select count(distinct
(salary)) from Emp b where b.salary>= a.salary)
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is a deadlock and what is a live lock?
How many types of attribute relationships are there? : sql server analysis services, ssas
How you can move data or databases between servers and databases in sql server?
How to modify existing triggers using "alter trigger"?
What is application role in sql server database security? : sql server security
What are views in ms sql server?
What is cross join in sql server joins?
What are trace flags?
How real and float literal values are rounded?
What is named query? : sql server analysis services, ssas
How can we determine what objects a user-defined function depends upon?
What is a document index?
What is the difference between online clustering and Offline clustering?
What is built-in function?
What is a data collection table?