题解

查找所有员工的last_name和first_name以及对应部门编号dept_no

https://www.nowcoder.com/practice/dbfafafb2ee2482aa390645abd4463bf

# 用左连接即可
select
    a.last_name,
    a.first_name,
    b.dept_no
from
    employees as a
left join
    dept_emp as b
on
    a.emp_no = b.emp_no;

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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