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
What are data pump export and import modes?
In which language oracle has been developed?
Can we save images in a database and if yes, how?
How to join two tables in a single query using oracle?
How to assign query results to variables?
What is meant by recursive hints in oracle?
How to do a full database export?
How to convert character types to numeric types?
Explain the difference between a procedure and a function?
What is materialized view in Oracle?
What are the general rules on data consistency?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
How can you use check constraints for self referential integrity?
Define oracle database
What is the maximum limit on the number of columns in a table?