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

List the data types available in mssql?

959


How can we get count of the number of records in a table?

901


Can you always create a cache of a report?

156


What are the different types of backups that exist?

1111


How to invoke a trigger on demand?

1029


Define synonym?

1118


What is the difference between cartesian product and cross join?

814


Explain “@@rowcount” and “@@error” in sql server?

1008


What is usually the first word in a sql query?

1073


What is an indexing strategy?

947


What is the recursive stored procedure in sql server?

968


What is analysis service repository?

969


What is index in an assignment?

894


What is fill factor and pad index?

957


What is a data source or ds? : sql server analysis services, ssas

952