exsits:用来判断是否存在某种条件的记录,存在就返回true,不存在则返回false。

select *
from employees e
where not exists(select *
                from dept_emp d
                where d.emp_no=e.emp_no);