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...

How to Select second Maximum salary in a Table ?

Answer Posted / sunil

select max(sal) from table_name where
sal<(select max(sal) from table_name);

or

select sal from(select sal,dense_rank() over(order by sal)
as rnk from table_name) where rnk=2;

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are synonyms used for?

980


How to run create database statement again?

1075


What are the set operators union, union all, minus & intersect meant to do?

935


How to create a single index for multiple columns?

976


What is sequence?

1007


How to use existing values in update statements using oracle?

1009


How to create a table interactively?

995


How can we view last record added to a table?

969


what is the difference between data migration and production migration.

2274


What is recovery manager in Oracle?

992


while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511

4291


What is ceil and floor in oracle?

1006


What is a lookup table in oracle?

929


What is the difference between $oracle_base and $oracle_home?

1026


How to use subqueries with the in operator using oracle?

1029