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 what are the events recorded in a transaction log?

1053


what is datawarehouse?

1159


What is BLOCK statements in SQL?

1312


What is unpivot?

1077


Can another user execute your local temporary stored procedures?

1027


Explain what are the different index configurations a table can have?

1163


Can coalesce return null?

1071


How to optimize stored procedure optimization?

968


What are the advantages of passing name-value pairs as parameters?

1220


Write a SQL command to insert and update only a particular field?

1193


Explain DBCC?

1016


Define left outer join?

1028


What is the tcp/ip port on which sql server runs?

1244


application server is slow what may be the problem

2274


What are null values in ms sql server?

1145