日期:2014-05-17 浏览次数:20970 次
select deptno from emp group by deptno having avg(sal)<(select avg(sal) from emp where deptno=30);
------解决方案--------------------
select deptno from emp group by deptno having nvl(avg(sal),0)<(select nvl(avg(sal),0) from emp where deptno=30);
------解决方案--------------------
select deptno
from emp group by deptno
having nvl(avg(sal),0)<(select nvl(avg(sal),0) from emp where deptno=30);