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

What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

2211


Can you tell me how to add new column in existing views?how?How is possible?

1372


How to get execution path reports on query statements?

929


What happens if you use a wrong connect identifier?

981


How to convert csv to table in oracle?

924


Does oracle database need java?

944


Write a syntax for update query in oracle?

970


What are temporal data types in oracle?

1066


How to define an anonymous procedure with variables?

1065


What is rich query?

928


What are oracle functions?

976


What is an anonymous block?

1158


What is redo log?

1006


I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?

2398


What is the maximum number of triggers that can be applied to a single table?

956