1 题目
2 MySQL
2.1 方法一(A join B on 条件)
select A.Name as Employee
from Employee as A join Employee as B
on A.ManagerId = B.Id
and A.Salary > B.Salary;
2.2 方法二(A, B where 条件)
select A.Name as Employee
from Employee as A, Employee as B
where A.ManagerId = B.Id
and A.Salary > B.Salary;
3 总结
join的两种等价写法
一个表可以和自身进行连接,即自连接