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 group functions in oracle?
What is analyze command used for?
What is meant by recursive hints in oracle?
What is the difference between a user and a schema in oracle?
query optmization techniques and quwry analyser+projects+ppts
How to rename an index?
What is archive log in Oracle?
Explain a synonym?
What is the difference between alert log file and tarce file ?
What is difference between truncate and delete?
Explain database link?
How to sort output in descending order in oracle?
What is an oracle database?
What is pragma autonomous transaction in oracle?
what is difference between sql plus and sql*plus? (not sql and sql plus).