题解 | not exists
使用含有关键字exists查找未分配具体部门的员工的所有信息。
https://www.nowcoder.com/practice/c39cbfbd111a4d92b221acec1c7c1484
/*select em.emp_no emp_no,birth_date,first_name,last_name,gender,hire_date from employees em left join dept_emp de on em.emp_no=de.emp_no where dept_no is null */ #no exists select * from employees where not exists(select * from dept_emp where employees.emp_no=dept_emp.emp_no)