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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the maximum number of triggers, you can apply on a single table?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
is it possible to pass an object or table to a procedure as an argument?
How to connect a sql*plus session to an oracle server?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
How to rename a table?
How many indexes can be created on a table in sql?
Can we rollback delete command?
What is rank function in sql?
When sql appeared?
What is pl sql code?
what is myisam? : Sql dba
What are the query optimization techniques?
How many developers work on postgresql?
what are the different tables present in mysql? : Sql dba