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
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
How to delete a column in an existing table in oracle?
Explain what are the characteristics of data files?
Whats the benefit of dbms_stats over analyze?
Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?
What is set operator oracle?
What privilege is needed for a user to query tables in another schema?
How can Oracle users be audited?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
Explain the dml?
How to retrieve values from data fields in record variables?
What is a sub query and what are the different types of subqueries?
What is a system tablespace and when it is created?
Explain the use of inctype option in exp command.
What do you mean by merge in oracle and how can you merge two tables?