描述
今天在寫SQL的時候,要求是這樣的,A表是個總表;B和C表是個關聯表
需要用A表左關聯到B和C的結果集
實現
加入有表 product ,order、order_item
product left join (order join orderitem)
select * from product
left join
order join order_item
on order.order_id = order_item.order_id
on product.product_id = order_item.product_id