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
Can we debug stored procedure?
What do you understand by pl/sql packages?
What is the difference between functions, procedures, and packages in pl/sql?
What is oracle sql developer?
What does the sign mean in sql?
Is it possible to create startup or shutdown trigger for on-schema?
Why do we need cursors in pl sql?
Can sql function call stored procedure?
What is the difference between mdf and ndf files?
Why procedure is used in sql?
How delete all records from table in sql?
How do you concatenate in sql?
Is it possible to sort a column using a column alias?
what is a join? : Sql dba
How would you convert date into julian date format?