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 are hotfixes and patches?
What is the difference between microsoft sql and mysql?
What is the difference between the implicit and explicit cursors?
What is trigger in pl sql?
Do foreign keys improve performance?
What is difference between joins and union?
what are the type of locks ? : Sql dba
What is the process of copying data from table a to table b?
What is using in sql?
Is delete faster than truncate?
What are secondary keys?
How is a process of pl/sql compiled?
Inline the values in PL/SQL, what does it mean.?
What is sp_helptext?
Is big data nosql?