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
What is sql*plus?
What is the purpose of the sql select top clause?
How do I start sql profiler?
What are the different types of dbmss?
Are stored procedures faster than queries?
Write an sql query to select all records from the table?
What is function and procedure in pl sql?
Can function return multiple values in sql?
how to convert character strings to dates? : Sql dba
How many postgresql users are there, worldwide?
Can we use the cursor's to create the collection in PL/SQL?
What can you do with pl sql?
What does the argument [or replace] do?
What is an alias command?
Is join and inner join the same?