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
Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.
What are sql dirty pages?
What does it mean to normalize data?
What is log shipping? Can we do logshipping with SQL Server 7.0 ?
What is a deadlock and what is a live lock?
Write a program using SQL queries to find a unique entry in a table.
What is the meaning of resultset type_scroll_insensitive?
Explain filestream storage of sql server 2008?
What is use of @@ spid in sql server?
How can change procedure in sql server?
What is reference section?
How to create a testing table with test data in ms sql server?
How will you optimize a stored procedure optimization?
What are the different types of backups that exist?
What is the difference between varchar and nvarchar datatypes?