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
What is meant by referential integrity?
What are the disadvantages of merge replication?
How to list all schemas in a database?
What is collation sensitivity?
What happens if null values are involved in comparison operations?
What do you need to connect php to sql server?
Give main differences between "Truncate" and "Delete".
explain the storage models of olap? : Sql server database administration
How many categories of data types used by sql server?
Explain the steps to use transact-sql cursor?
What are sp_configure commands and set commands?
what is a correlated sub-query? : Sql server database administration
How to deploy the Report?
How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?
Define cursor locking