北京西站到北京南站,网站购物车设计,潍坊网站优化排名,网站流量在哪设置解法(1)#xff1a;思路为先查询出订购的客户再使用not in查询出不包含订购客户的其他人也就是从来不订购的客户 查询出订购的客户语句:
select a.Id from Customers as a,Orders as b where b.CustomerIda.Id再使用not in 查询 不再里面的客户
select Name as Customers fr…
解法(1)思路为先查询出订购的客户再使用not in查询出不包含订购客户的其他人也就是从来不订购的客户 查询出订购的客户语句:
select a.Id from Customers as a,Orders as b where b.CustomerIda.Id再使用not in 查询 不再里面的客户
select Name as Customers from Customers where Id not in (select a.Id from Customers as a,Orders as b where b.CustomerIda.Id) 解法(2)使用左联 查询所有Order表的数据并查询name 为空的数据
select c.Name as Customers from Customers c left join Orders o on c.Ido.CustomerId where CustomerId is null;