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
Can a synonym name of a table be used instead of a table name in a select statement?
How to enforce security in sql server? : sql server security
what is the primary use of the model database? : Sql server administration
Can sql servers link to other servers like oracle?
How to manipulate data from one table to another table ?
Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?
which backup strategy you are following at ur company
How to add the custom code in Report?
What is cdc in sql server?
What are the three different part of rdl file explain them?
How to get all stored procedures in sql server?
How many tables can be joined in SQL Server?
How do I find the size of a sql server database?
What gets stored inside msdb database?
What are the new features in sql server 2016?