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表示并集