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
(EmpID) from tblSalary b where b.empid=a.empid)
for any RDBMS
| Is This Answer Correct ? | 2 Yes | 13 No |
Post New Answer View All Answers
Why should you use or avoid select * statements?
What is the need for indexing?
What are .mdf files?
Can a function call a stored procedure in sql server?
How to make a column nullable?
Some queries related to SQL
Can truncate be rolled back?
What are a scheduled jobs?
What is openxml in sql server?
How to change the password of a login name in ms sql server?
What is merge statement?
Explain alternate key, candidate key and composite key in sql server?
What is update locks?
How would you go about developing a ssrs report?
What are the advantages of sql stored procedure?