how to find the second highest salary from emp table?
Answer Posted / manjusha
select * from emp e1
where 2=(select count(distinct salary) from emp e2
where e1.sal<e2.sal);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is sql and how does it work?
What is cursor status?
What is graph sql?
Why is normalization important?
What is difference between hql and sql?
What is case function?
What is example of database?
How many aggregate functions are available there in sql?
What is the usage of nvl function?
Is and as keyword in pl sql?
What is sql constant?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
Why join is faster than subquery?
How to disable a trigger name update_salary?
What is pl sql variable?