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 ecc 6.0

2204


How to list all tables in your schema?

1117


Which is better Oracle or MS SQL? Why?

6484


What is the quickest way to fetch the data from a table?

1100


How to define a data source name (dsn) in odbc manager?

1082


How to assign values to variables?

1164


What is tns entry?

1236


Explain the use of file option in exp command.

1177


How do I escape a reserved word in oracle?

1256


How do I connect to oracle?

1080


How can we force the database to use the user specified rollback segment?

1200


What is a subquery in oracle?

1167


Where do you use decode and case statements?

1044


what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?

2319


What is a schema in oracle?

1065