The query displays the corresponding records
select DEPARTMENT_ID from hr.departments
minus
select DEPARTMENT_ID from hr.employees;
I am using LIVE SQL, I think the following queries are similar.
This query no data found
select d.DEPARTMENT_ID
from hr.departments d where d.DEPARTMENT_ID NOT IN( select e.DEPARTMENT_ID from hr.employees e );
This query no data found
select d.DEPARTMENT_ID
from hr.departments d where NOT EXISTS( select e.DEPARTMENT_ID from hr.employees e );
Do you help me please, thanks a lot