找出订单表中没有下单的顾客名称
顾客表 customers
id
name
id name
1 joe
2 henry
3 sam
4 max
订单表 orders
id
customerid
id customerid
1 3
2 1
求没有下单的顾客
select c.name as customers
from customers c
left join orders o
on c.id=o.customerid
where o.id is null
找出顾客表中顾客的名称
表联合后过滤出订单表中顾客id为空的
浙公网安备 33010602011771号