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

Whats the benefit of dbms_stats over analyze?

2005


What is oracle server autotrace in oracle?

1166


What is Library Cache in Oracle?

1144


when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.

2002


What is a data dictionary and how can it be created?

1155


What is the difference between truncate & delete command?

1188


What is the simplest tool to run commands on oracle servers?

1013


Can select statements be used on views in oracle?

1029


Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).

2328


What are temporal data types in oracle?

1128


Give the different types of rollback segments.

1031


How to pass parameters to procedures in oracle?

1042


Difference between oracle's plus (+) notation and ansi join notation?

1111


How do we create privileges in oracle?

1050


What are the arithmetic operations?

1087