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 / abhijit

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
desc)
as rnk from table_name) where rnk=2;

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a combination of "like" and "in" in sql?

1114


What are the built-in functions used for sending Parameters to forms ?

3432


What is where clause in oracle?

1075


How remove data files before opening a database?

1132


How to rename a column in an existing table?

1081


What are the numeric comparison operations?

1165


Is primary key indexed by default in oracle?

1046


What is execute immediate in oracle?

1076


How to define a record variable to store a table row?

1109


What are advantages of dateset in datastage?

2305


What is Java Pool in Oracle?

1235


What is a subquery?

1191


Can objects of the same schema reside in different tablespace?

1101


How index is implemented in oracle database?

1041


How to write numeric literals in oracle?

1233