find out the second highest salary?
Answer Posted / peter
SQL> select max(sal) sal
2 from (select sal,
3 dense_rank() over
4 (order by sal desc) rnk
5 from emp )
6 where rnk = 2;
SAL
----------
3000
SQL>
| Is This Answer Correct ? | 14 Yes | 9 No |
Post New Answer View All Answers
Give the various rollback segment states.
 How to use an oracle sequence generator in a mapping?
What is tns entry?
What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.
What is the difference between PFILE and SPFILE in Oracle?
Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?
6. Display the client name and order date for all orders using the traditional method.
Explain the use of tables option in exp command.
How do we display rows from the table without duplicates?
is there a tool to trace queries, like profiler for sql server?
How to rename an existing table?
Can you tell me how to add new column in existing views?how?How is possible?
What happens to the data files if a tablespace is dropped?
Explain self joins in oracle?
How to write an inner join with the where clause in oracle?