how to find the second highest salary from emp table?
Answer Posted / bibin__edappal
select salary from empTable where salary = (select
max(salary )from empTable where salary < (select max(salary
) from empTable))
OR
select salary from empTable where salary = (select
max(salary )from empTable where salary NOT IN (select
max(salary ) from empTable))
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is rank () in sql?
Does db2 use sql?
What is clause in sql?
what is collation? : Sql dba
how to use 'mysql' to run sql statements? : Sql dba
What is multiple columns?
How many times can we commit in a loop?
What is the use of nvl function?
Does pl sql work in mysql?
Can there be more than one function with a similar name in a pl/sql block?
What does the base_object_type column shows in the user.triggers data dictionary view?
explain about mysql and its features. : Sql dba
what is subquery? : Sql dba
What is difference between hql and sql?
Explain what is table in a database?