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 / govind.konduri

hai..

select sal from emp where sal=(select max(sal) from
emp where sal<(select max(sal) from emp))

->here,the sub inner query finds the max sal from emp table.
->the main inner query find out the max sal that is less
than the sub inner query max sal.
->the sub query result is sent to outer query..

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain sub-query?

930


How to truncate the log in sql server 2012? : sql server database administration

1258


What is mssql?

973


What is the difference between locking and multi-versioning?

972


What is microsoft sql server?

955


What are drillthrough reports?

155


What is the full meaning of dml?

935


Tell me something about security and sql azure?

114


How to convert numeric expression data types by assignment operations?

1051


Which joins are sql server default?

977


Can we perform backup restore operation on tempdb? : sql server database administration

973


How to use subqueries with the in operators in ms sql server?

1052


What are the requirements on sql server network connections?

947


What is Dependency Injection and provide example?

1099


What is the need for group functions in sql?

1052