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 are different categories of sql commands?
What is join view in sql?
What is the use of index in sql?
How do I count rows in sql?
In a distributed database system, can we execute two queries simultaneously?
what is a unique key ? : Sql dba
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
What are joins in sql?
explain normalization concept? : Sql dba
Is big data nosql?
Are stored procedures faster than queries?
what happens if null values are involved in expressions? : Sql dba
How does cross join work in sql?
How can a function retun more than one value in oracle with proper example?