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 dual table in oracle?
How to write date and time interval literals in oracle?
Explain mutating triggers.
How to delete an existing row from a table in oracle?
How to create tables for odbc connection testing?
what is difference between sql plus and sql*plus? (not sql and sql plus).
What is logical backup in oracle?
Explain the difference between sql and oracle?
What happens to the current transaction if the session is killed?
when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.
What is different types of joins?
How to create a temporary table in oracle?
What is an anonymous block?
what is the use of system.effective.date variable in oracle?
how to make an oracle object