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
what is raid? : Sql server database administration
What are 3 ways to get a count of the number of records in a table?
What is the standby server?
Where is trigger in sql server?
How to sort query output in descending order in ms sql server?
How to locate and take substrings with charindex() and substring() functions?
What is check constraint in sql server?
What is the simplest way to create a new database in ms sql server?
What is a synonym for manipulation?
Can you explain different types of locks in sql server?
What are the dmvs? : sql server database administration
Is sql server free?
How to transfer data from a cursor to variables with a "fetch" statement?
Is it possible to replicate data from sql server to oracle? : sql server replication
Does an index slow down updates on indexed columns?