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 ? | 5 Yes | 2 No |
Post New Answer View All Answers
What is query optimization in sql?
what does it mean to have quoted_identifier on? : Sql dba
What are different types of triggers?
What is sql injection vulnerability?
what is cursor. write example of it. What are the attributes of cursor.
What are all the different normalizations?
What is sqlca in powerbuilder?
What is left inner join in sql?
How to select unique records from a table?
What is fmtonly in sql?
what is subquery? : Sql dba
How does pl sql work?
Explain the the update statement in sql?
How can I see all tables in sql?
Why is normalization important?