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
what is bcp? When is it used?
What is the sql query to display the current date?
What is duration in sql profiler trace?
What is cursor and its types?
Can we perform dml on view?
Name the operator which is used in the query for pattern matching?
what are aggregate and scalar functions? : Sql dba
Why do we use set serveroutput on?
How to order siblings in oracle hierarchy queries?
What is example of database?
What is the execution plan in sql?
What is cartesian join in sql?
What are the key differences between SQL and PL SQL?
Can we commit in trigger?
How to raise user-defined exception with custom sqlerrm ?