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

Name three of the features managed by the surface area configuration tool? : sql server security

1034


Explain difference between cross join and full outer join?

1068


What is the federation in sql azure?

97


How you can minimize the deadlock situation?

1084


What are triggers? How do you invoke a trigger on demand?

1367


How to maintain a fill factor in existing indexes?

1057


What are the properties of primary key?

1017


How to drop an existing table with "drop table" statements in ms sql server?

1149


How do users use Report Builder with SQL Server data sources?

165


What is create statement?

1010


What are sql servers used for?

1114


Define indexes?

1096


How to use transact-sql statements to access the database engine?

1126


how to do partition in sqlserver

2547


What command is used to rename the database?

1089