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 innodb? : Sql dba
How many scalar data types are supported in pl/sql?
What is the difference between pl and sql?
How exception handling is done in advance pl/sql?
Does access use sql?
Explain the the delete statements in sql?
- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?
What is type and rowtype in pl sql?
What is the difference between the conventional and direct path loader? : aql loader
What is a primary key called that is made up of more than one field?
How do I view output in sql developer?
How do you write a subquery?
What is the use of <> sql?
How to change sql*plus system settings?
what is the syntax for using sql_variant_property? : Transact sql