题目 解题思路: 处理这种关联表关系,第一我们根据题意来找到关键字“不订购”,代表着orders表中无该用户id信息。 1、两张表中关系最严密的时用户id。 2、不订购用户,所以使用外连接,不能使用内连接。 3、使用MySQL自带的判空处理:is null 代码实现: select c.Name as Customers from Customers c left join Orders o on o.CustomerId =c.Id where o.Id is null;