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 union? : Sql dba
Why procedure is used in sql?
How many times can we commit in a loop?
what is a constraint? Tell me about its various levels. : Sql dba
How is indexing done in search engines?
What is partition in sql query?
How can I change database name in sql?
Why join is faster than subquery?
What are the different types of dbmss?
what is single byte over head in oracle..?
Does oracle roll back the transaction on an error?
If a cursor is open, how can we find in a pl/sql block?
What are literals in sql server?
which operator is used in query for pattern matching? : Sql dba
What is varchar example?