Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is user-defined multi-statement table-valued function?

1038


What is a file group?

1069


Difference between Inner vs outer joins?

929


How to fetch the next row from a cursor with a "fetch" statement?

1056


What is the significance of null value and why should we avoid permitting null values?

968


How can windows applications connect to sql servers via odbc?

1109


What is the difference between TRUNCATE and DROP?

1108


What is a trigger in sql server?

1142


What is spid in sql server profiler?

1082


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

950


What are the requirements on sql server network connections?

948


What are the recovery models in sql server 2000?

947


how to control the amount of free space in your index pages? : Sql server database administration

1020


What is a functions and types in sql server?

1063


Which are ddl commands?

1028