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
how to shutdown mysql server? : Sql dba
what is the difference between a local and a global temporary table? : Sql dba
What operators deal with null?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
What is the benefit of foreign key?
What are local and global Indexes and where they are useful.
What is set serveroutput on in pl sql?
What programs use sql?
What is lexical units in pl sql?
What are the different operators available in sql?
How to use sql*plus built-in timers?
what is a control file ? : Sql dba
What are different types of sql commands?
Can we alter stored procedure?
what are the differences between binary and varbinary? : Sql dba