find out the third highest salary?

Answer Posted / selvaraj anna university coe

In Oracle 9i:
-------------

SQL> SELECT MAX(salary) FROM emp WHERE LEVEL=&no CONNECT BY
PRIOR Salary>salary;


Enter value for no: 3

old 1: SELECT MAX(SALARY) FROM EMP WHERE LEVEL=&no
CONNECT BY PRIOR SALARY>SALARY
new 1: SELECT MAX(SALARY) FROM EMP WHERE LEVEL=3 CONNECT
BY PRIOR SALARY>SALARY

MAX(SALARY)
-----------
500000

SQL>

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is it different from a normal table?

582


How translate command is different from replace?

545


How to shutdown your 10g xe server from command line?

554


In which language oracle has been developed?

646


How to pass parameters to procedures in oracle?

570






What is recycle bin in Oracle?

719


What is dynamic proxy?

551


What is the difference between postgresql and oracle?

503


Explain about achiever in sql?

584


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

1561


What is ordinary table in oracle?

652


How to rebuild an index in oracle?

552


Explain about the analyze command in oracle?

587


How would you best determine why your MVIEW couldnt FAST REFRESH?

1436


Give the various rollback segment states.

579