select dname deptno from dept where deptno in select deptno from emp ;