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 / sumesh.s.g
--Sumesh.S.G--
SELECT TOP 1 salary
FROM (select top 3 Salary
from dbo.TBL_Employee
order by Salary desc) as TemTable order by Salary asc
--Happy coding--
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to choose all records from the table?
What is the process of normalization?
Which tools are available to manage SQL Azure databases and servers?
How to list all objects in a given schema?
How to test subquery results with the exists operator?
How do you set a trace flag in sql server?
Why is normalisation important?
How to create a user to access a database in ms sql server using "create user" statements?
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
List all the types of user-defined functions?
can any body tell me how to know the password of current user in sql server
Explain what are the restrictions while creating batches in sql server?
What is executereader?
Is there any difference between the primary key and unique key?
Tell me what are the advantages of using stored procedures?