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 get second highest sal of emp table

Answer Posted / anilchandu

Select * from emp x where 2=(select count(distinct sal)
from emp y where x.sal<=y.sal)


where x,y are alias names.

If you want 3rd heighest salary then just replace 2 by 3

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sharding mean?

1067


definition of cluster and non-clustered index?

3121


How to rename a tablespace in oracle?

1135


How to manage transaction isolation level?

1065


What is bind variable in oracle 11g?

1102


What is meant by recursive hints in oracle?

1137


What is system global area (sga) in oracle?

1042


What are the advantages of oracle 12c?

1247


What is rich query?

1042


How to experiment a data lock in oracle?

1119


what are steps for interface? where is exchange rate defined in which table?

2252


What is a procedure in oracle?

1295


What are ddl statements in oracle?

1138


ABOUT IDENTITY?

2112


What are the differences between char and varchar2 in oracle?

1261