内连接 - 自连接
将一张表看作两张表
例子:查询员工的上级领导,要求显示员工名和对应的领导名
SELECT
a.ename AS 员工, b.ename As 领导
FROM
emp a
INNER JOIN
emp b
ON
a.mgr = b.empno;
标签:ename,MySQL9,empno,员工,emp,连接
From: https://www.cnblogs.com/Ashen-/p/17032590.html
将一张表看作两张表
例子:查询员工的上级领导,要求显示员工名和对应的领导名
SELECT
a.ename AS 员工, b.ename As 领导
FROM
emp a
INNER JOIN
emp b
ON
a.mgr = b.empno;
标签:ename,MySQL9,empno,员工,emp,连接
From: https://www.cnblogs.com/Ashen-/p/17032590.html