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

find out the second highest salary?

Answer Posted / abhijit ramakant parb

select min(a.sal) from(select distinct d.sal from emp d
order by sal desc) a where rownum<=2;

To retrieve all columns

select * from emp where sal=(select min(a.sal) from(select
distinct d.sal from emp d order by sal desc) a where
rownum<=2);

Is This Answer Correct ?    12 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is materialized view in Oracle?

1050


What is define in oracle?

1030


What is index in Oracle?

1032


How do I limit the number of oracle database connections generated by weblogic server?

1024


How to load a large xml file?

1019


How do I find the database name in oracle?

1002


How can Oracle users be audited?

1076


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

4311


What are named parameters?

1050


What happens if the update subquery returns multiple rows?

1070


Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

974


How can I introduce multiple conditions in like operator?

948


What happens to the indexes if a table is recovered?

959


Is there any function in oracle similar like group_concat of mysql?

1011


What is an oracle and why it is used?

1103