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 synchronized subquery?
Why are sql stored procedures used?
How to call shell script from pl sql procedure?
Can dml statements be used in pl/sql?
How do you create a unique index?
what are the 'mysql' command line arguments? : Sql dba
What are tables and fields in the database?
Can we create table inside stored procedure?
What are the usages of sql?
What is the difference between inner join and natural join?
What are the different set operators available in sql?
Explain the purpose of %type and %rowtype data types?
How delete all records from table in sql?
What does dml mean?
Can we perform dml on view?