Query for second maximum salary in each in each department
Answer Posted / akula
select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are inner outer left and right joins in sql?
What is the process of debugging?
What is benefit of creating memory optimized table?
How do I turn a list into a table?
Why do we use sql constraints?
Is pl sql better than sql?
What is union, minus and interact commands?
What normalization means?
What are crud methods?
What are sql triggers used for?
What is a primary key example?
What is a nested table in word?
How does sql profiler work?
What is number function in sql?
How do you use a while loop in pl sql?