题解 | #使用含有关键字exists查找未分配具体部门的员工的所有信息。#

使用含有关键字exists查找未分配具体部门的员工的所有信息。

http://www.nowcoder.com/practice/c39cbfbd111a4d92b221acec1c7c1484

mysql not exists的语法,对比两种用法的差别

用exitst

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

不用exists

select * from employees e 
left join dept_emp d 
on e.emp_no = d.emp_no
where d.emp_no is null
全部评论

相关推荐

这是什么操作什么意思,这公司我服了...
斯派克spark:意思是有比你更便宜的牛马了
点赞 评论 收藏
分享
码农索隆:想看offer细节
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务