find out the second highest salary?

Answer Posted / peter

SQL> select sal
2 from (select sal,
3 row_number() over
4 (order by sal desc ) rn
5 from emp )
6 where rn = 2;

SAL
----------
3000

SQL>

Is This Answer Correct ?    13 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between sid and service name in oracle?

516


How to specify default values in insert statement using oracle?

558


How to use null as conditions in oracle?

581


Which environment variables are absolutely critical in order to run the OUI?

1652


HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE

1784






What is not equal to in oracle?

526


What is SQL access advisor in Oracle?

630


What are the differences between interval year to month and interval day to second?

550


How do I find the database name in oracle?

599


What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?

522


What are a query and state the different types of queries and their uses?

510


What is the maximum number of triggers that can be applied to a single table?

557


What is the difference between online and offline backups?

560


hey friends, What are the steps I can do to transfer the database from Microsoft Access 2003 to oracle10g (or SQL) Best regards

1562


What is recycle bin in Oracle?

715