已知某 MySQL 数据库中,有表及其字段如下: Employee(员工)表,字段:ID(标识,主键)、Name(姓名)、DepartmentID(班级标识,外键) Department(部门)表,字段:ID(标识,主键)、Name(名称) 要查询所有空部门,可以使用的查询语句是:

发布于 2021-02-15 14:04:30
【单选题】
A SELECT * FROM Department LEFT JOIN Employee ON Department.ID = Employee.DepartmentID AND Employee.DepartmentID = NULL
B SELECT * FROM Department LEFT JOIN Employee WHERE Department.ID = Employee.DepartmentID AND Employee.DepartmentID IS NULL
C SELECT * FROM Department LEFT JOIN Employee ON Department.ID = Employee.DepartmentID WHERE Employee.DepartmentID IS NULL
D SELECT * FROM Department LEFT JOIN Employee ON Department.ID = Employee.DepartmentID AND Employee.DepartmentID IS NULL

查看更多

关注者
0
被浏览
9
  • 体验AI问答!更聪明、超智能!
  • 一款基于GPT的超级AI助手,可以对话、创作、写文案!
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

手机
浏览

扫码手机浏览

分享
好友

在线
客服