Query for second maximum salary in each in each department
Answer Posted / suneelkumar
select * from emp x where 2=(select count(distinct sal) from
emp y where x.sal<=y.sal) group by deptno;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How can you create an empty table from an existing table?
How do I create a memory optimized filegroup?
How can you view the errors encountered in a trigger?
How do I view a table in sql?
What is trigger types of trigger?
What does the hierarchical profiler does?
How do I run pl sql in sql developer?
What will you get by the cursor attribute sql%found?
Is left join faster than join?
What is structural independence and why is it important?
What is cursor and its types?
What are the parameter modes supported by pl/sql?
How to find 3rd highest salary of an employee from the employee table in sql?
Can there be 2 primary keys in a table?
what is a unique key ? : Sql dba