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 data locks are respected in oracle?

568


How do I call oracle stored procedures that take no parameters?

560


Is oracle an operator?

527


How to list all indexes in your schema?

574


What privilege is needed for a user to query tables in another schema?

502






what are steps for interface? where is exchange rate defined in which table?

1491


What is analyze command used for?

573


What is recovery manager in Oracle?

587


How do I find the database name in oracle?

599


How to use group functions in the select clause using oracle?

587


Explain parameter file in oracle.

572


what are bitmap indexes? How does they work?

1714


What is an oracle database?

608


Can you assign multiple query result rows to a variable?

543


What is index in Oracle?

584