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 the second highest salary of the emp table

Answer Posted / ramesh.ch

select max(salary) from emp
where salary< ( select max(salary) from emp)


explanation::

first sub query returns maximum salary of employee
than main query returns maximum salary lessthan the maximum
salary return by subquery

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster join or subquery in oracle?

995


Give the constructs of a package, function or a procedure.

1045


Can objects of the same schema reside in different tablespace?

1063


How to connect asp pages to oracle servers?

1072


How to call a stored function with parameters?

1046


What operating systems are supported by oracle database 10g xe?

1034


What is flashback in Oracle?

1019


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

2276


why should i declare foreign key constraint as self relation instead of binary relation in tables ?

2044


How to define a cusotmer as a supplier in ORACLE R12

2232


What is the fastest query method to fetch data from the table?

1362


How to grant create session privilege to a user in oracle?

1002


How many categories of data types in oracle?

1029


How to get maxsal , minsal, ename department wise in single query

1549


what is meant by magic query

2187