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 / ashok
select sal from emp order by sal desc offset 1 rows fetch next 1 rows with ties;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is lexical units in pl sql?
what is data manipulation language? : Sql dba
Can we use having without group by in sql?
What is the left table in sql?
What is the reports view in oracle sql developer?
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
How to use sql*plus built-in timers?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is the purpose of cursors in pl/sql?
How many times can we commit in a loop?
What is trigger and how to use it in sql?
What are the benefits of pl/sql packages?
Explain clause in sql?
Can there be 2 primary keys in a table?
What is scalar function?