查询Orders表中的CustomerId,
再查Customers表中的ID不在这些CustomerId中的,
注意查询Orders表不要查找名字,因为表Customers中
ID不可以重复,但名字不一定,大意了,第一次提交出错了。
select Name Customers from Customers
where Id
not in (select CustomerId from Orders);
LeetCode_MySQL05_183从不订购的客户
最新推荐文章于 2024-08-05 15:41:47 发布