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 is the difference between substr and instr function in oracle?
What is difference between cartesian join and cross join?
Explain the use of consistent option in exp command.
How to assign data of the deleted row to variables?
What happens in oracle commit?
List the various oracle database objects?
How do you tell what your machine name is and what is its IP address?
What is difference between sid and service name in oracle?
How to define an oracle sub procedure?
How to rename an index?
Can we write insert statement in function in oracle?
What is system tablespace?
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?
What do you mean by group by clause?
What is the implicit cursor in oracle?