How to retrieve a second highest salary from a table?
Note:Suppose salaries are in duplicate values
eg:
Name Sal
Malli 60000
Pandi 60000
Rudra 45000
Ravi 45000
Answer Posted / prativa mishra
select *
from
(select salary,dense_rank() over (order by salary) kk from table_name)
where kk=2
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
How does cross join work?
Can ddl statements be used in pl/sql?
What is sql engine in oracle?
Explain the savepoint statement.
What are hotfixes and patches?
What is attribute indicator in pl sql?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
What is rownum in sql?
Explain isolation levels. : Transact sql
How do you update a table in sql?
What is %rowtype in pl sql?
What is ttitle and btitle?
Is pl sql better than sql?
How to display the records between two range in Oracle SQL Plus?
What are the benefits of pl sql?