2018-11-16 连接查询

image.png

答案:

  • 题目1
product.id amount product_details.id weight exist
1 100 null null null
2 200 2 22 0
3 300 null null null
4 400 4 44 1
  • 题目2
product.id amount product_details.id weight exist
2 200 2 22 0

解析:
左连接保留所有左表所有值,where表示筛选,and表示并集

你可能感兴趣的:(2018-11-16 连接查询)