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

How to login to the server without an instance?

1101


11. Display the client number and name and the client number and name of the person who referred that client.

2270


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

1290


How to create a new user account in oracle?

952


What privilege is needed for a user to create views in oracle?

977


What is index-organized table in Oracle?

1018


is there a tool to trace queries, like profiler for sql server?

1075


What are the restrictions on external table columns?

990


How to execute a stored program unit?

1001


How to view all columns in an existing table?

869


How do I escape a reserved word in oracle?

1124


What is dual table oracle?

920


What is blob data type in oracle?

1042


How to write a query with a right outer join in oracle?

1108


Differentiate between post-database commit and post-form commit?

978