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
How do I know if oracle is installed on windows?
What is a named program unit?
How index is implemented in oracle database?
what is insert all statement in sql
What is the difference between $oracle_base and $oracle_home?
What is the difference between primary key and unique key and foreign key in oracle?
What is query image?
Explain the use of file option in exp command.
How to assign a tablespace to a users in oracle?
Why do you create or replace procedures rather that drop and recreate.
What is the difference between truncate & delete command?
How to Truncate Table in Oracle
Differentiate between translate and replace?
How to rename an existing table?
What is literal?