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
What is concurrency in oracle?
What are the set operators union, union all, minus & intersect meant to do?
What are the uses of a database trigger?
definition of cluster and non-clustered index?
Explain the use of online redo log files in oracle.
How to view existing locks on the database?
How to drop a stored function?
How to run the anonymous block again?
What are nested tables?
Please explain joins in oracle?
What happens if the imported table already exists?
Is a rollback possible to any savepoint?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?
Difference between cartesian join and cross join?