select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.
Answer Posted / sunil nair
SELECT EmpID,Salary from tblSalary a where 3=(select count
(distinct EmpID) from tblSalary b where b.empid>=a.empid)
For any database
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
When would you use the stored procedures or functions?
Can you explain different types of joins?
List the different types of collation sensitivities in sql server?
Do you know how to implement service broker?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
Why SQL Agent is used?
Explain what are partitioned views and distributed partitioned views?
Can you explain what are commit and rollback in sql?
What is history table in sql server?
Can a database be shrunk with users active?
What are the acid properties?
What are data regions?
What is view in sql?
What is the difference between delete and truncate statements?
What are click through reports?