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
How do you drop a trigger?
What are database links used for?
Does mysql_real_escape_string prevent sql injection?
Can a procedure in a package be overloaded?
what is a database transaction? : Sql dba
What is the current version of sql?
Why are aggregate functions called so?
Can we use loop in sql?
what are the properties and different types of sub-queries? : Sql dba
What is the maximum number of rows in sql table?
Can we have two clustered index on a table?
What is rownum and rowid?
Explain what is rdbms?
how many triggers are allowed in mysql table? : Sql dba
how to analyze tables with 'mysqlcheck'? : Sql dba