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 the use of sql trace?
What is the difference among union, minus and intersect?
What is sql*loader and what is it used for? : aql loader
What are procedures used for?
Why is sql important?
Can we commit inside a trigger?
What are synonyms in sql?
what is timestamp in mysql? : Sql dba
Enlist the characteristics of pl/sql?
How do I run a sql query?
What is a natural join sql?
Is it important to partition hard disk?
what are rollup and cube in t-sql? : Transact sql
What are different methods to trace the pl/sql code?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me