find out the second highest salary?

Answer Posted / akash

select emp_id,sal from ( select emp_id,sal from emp where
sal < ( select max(sal) from emp) order by sal desc ) where
rownum < 2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if the imported table already exists?

634


What is the usage of analyze command in oracle?

701


What is a proxy class?

639


What do you mean by merge in oracle and how can we merge two tables?

684


How do I manually create a database in oracle?

618






What happens if the update subquery returns multiple rows?

691


What are the data types in oracle?

654


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

1963


How do I spool to a csv formatted file using sqlplus?

619


Why we use bulk collect in oracle?

605


What is Virtual Private Database in Oracle?

715


What is a data dictionary and how can it be created?

693


What are dml statements in oracle?

702


How does Oracle guarantee data integrity of data changes?

2020


How to drop a tablespace?

655