How to Select second Maximum salary in a Table ?
Answer Posted / sunil
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)
as rnk from table_name) where rnk=2;
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Explain what are synonyms used for?
How to run create database statement again?
What are the set operators union, union all, minus & intersect meant to do?
How to create a single index for multiple columns?
What is sequence?
How to use existing values in update statements using oracle?
How to create a table interactively?
How can we view last record added to a table?
what is the difference between data migration and production migration.
What is recovery manager in Oracle?
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
What is ceil and floor in oracle?
What is a lookup table in oracle?
What is the difference between $oracle_base and $oracle_home?
How to use subqueries with the in operator using oracle?