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

What is a document index?

1035


What are the fixed server level roles? : sql server security

1141


 Explain what is sql override for a source taLle in a mapping?

1015


Explain go command in sql server?

1044


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that

2223


What is rank function?

1036


How to return the top 5 rows from a select query in ms sql server?

1146


What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?

1173


What specific conditions database should meet, before you can bulk copy data into it using bcp?

989


What is raiseerror? What is raiseerror?

1147


Mention what are the core components of ssrs?

323


Create and insert into temp table in sql server?

1037


Explain difference between cross join and full outer join?

1012


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

1068


What are functions in the sql server?

1225