题解 | 使用含有关键字exists查找未分配具体部门的员工的所有信息。
使用含有关键字exists查找未分配具体部门的员工的所有信息。
https://www.nowcoder.com/practice/c39cbfbd111a4d92b221acec1c7c1484
#查询出在员工表和部门表中的员工号 # select emp_no from dept_emp where employees.emp_no = dept_emp.emp_no # select * from employees where not exists (select emp_no from dept_emp where employees.emp_no = dept_emp.emp_no)
