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...

can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com

Answer Posted / sabin v jacob

SELECT Min(Sal) FROM (SELECT TOP 2 Sal FROM emp ORDER BY
Sal desc) as Temp

or

SELECT Min(Sal) FROM emp WHERE Sal IN(SELECT TOP 2 Sal FROM
emp ORDER BY Sal DESC)

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

1220


What is difference between rollback immediate and with no_wait during alter database?

1094


How are the unique and primary key constraints different?

1077


What is reference section?

1009


What is the guest user account in sql server? What login is it mapped to it? : sql server security

1065


Can we take the full database backup in log shipping?

955


What is set nocount on and what is set nocount off?

935


How secure is sql server database?

1016


what is hash nonclustered index

970


What happens when the SQL Azure database reaches Max Size?

111


How to change parameter value inside the report?

165


Explain hostprotectionattribute in sql server 2005?

1040


Explain difference between cross join and full outer join?

1010


Explain the various types of concurrency problem?

1198


Why use triggers?

1017