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
How to assign a table row to a record variable?
How do we get field details of a table?
Is primary key indexed by default in oracle?
Use of an integrity constraint is better to validate data. Explain
How to create a table in a specific tablespace?
How can I create database in oracle?
what is the difference between restoring and recovering?
What is the difference between sharding and partitioning?
How to shutdown your 10g xe server from command line?
What are the differences between interval year to month and interval day to second?
What does sharding mean?
What exactly do quotation marks around the table name do?
How to pass a parameter to a cursor in oracle?
What are the different editions of oracle?
what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?