How to retrieve department no that is not having the data in emp table
Display all employees who are joined before their manager and they are not managers
Printable View
How to retrieve department no that is not having the data in emp table
Display all employees who are joined before their manager and they are not managers
[quote=sriram.bethe;28295]how to retrieve department no that is not having the data in emp table display all employees who are joined before their manager and they are not managers[/quote]
select deptno , dname
from dept
where deptno not in (select deptno from emp);
select a.empno,a.ename, a.hiredate from emp a
where a.job <> 'manager'
and a.hiredate < (select hiredate from emp b where a.mgr = b.empno);