how to find the second highest salary in a given table????

Answer Posted / shahnaz

To find the 2nd highest salary from emp table:

select max(sal) from emp where sal not in (select max(sal)
from emp )

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the Tune Query

1837


please explain.. DB architecture ...

1557


Is it possible to insert comments into sql statements return in the data model editor ?

2061


what is the scripts in data base?

1598


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

539






What privilege is needed for a user to delete rows from tables in another schema?

562


What are the different types of record groups in oracle? Explain each of them

596


Explain the blob datatype?

610


How to define a procedure inside another procedure?

539


6. Display the client name and order date for all orders using the traditional method.

1746


What is meant by recursive hints in oracle?

613


How to change user password in oracle?

601


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1797


What is user managed backup in Oracle?

608


What is PL/SQL ?

1106