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

your distribution database is full what will u do

2167


Explain having clause?

954


How to provide default values to stored procedure parameters?

1054


How to provide values to stored procedure parameters in ms sql server?

1025


What is the difference between char and varchar2 datatype in sql?

1057


How do I find query history in sql server?

932


How to transfer an existing table from one schema to another schema in ms sql server?

974


Explain the difference between functions and stored procedures in sql server?

971


What is ms sql server service broker?

978


What is the difference between grant and with grant while giving permissions to the user?

949


Does server sql treat char as a variable-length or fixed-length column?

1000


How to create a new login name in ms sql server?

1051


Explain collation?

1054


sql database suspect We have a sql database that is showing as suspect. How can we recover?

1914


Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

942