How to Select second Maximum salary in a Table ?
Answer Posted / abhijit
select max(sal) from table_name where
sal<(select max(sal) from table_name);
or
select sal from(select sal,dense_rank() over(order by sal
desc)
as rnk from table_name) where rnk=2;
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
Can you tell me how to add new column in existing views?how?How is possible?
How to get execution path reports on query statements?
What happens if you use a wrong connect identifier?
How to convert csv to table in oracle?
Does oracle database need java?
Write a syntax for update query in oracle?
What are temporal data types in oracle?
How to define an anonymous procedure with variables?
What is rich query?
What are oracle functions?
What is an anonymous block?
What is redo log?
I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?
What is the maximum number of triggers that can be applied to a single table?