仅当当前表的列与另一个表的列匹配时,才从当前表中选择行
调用此表:customers
+----+-------------+
| id | name |
+----+-------------+
| 1 | roger |
| 2 | steve |
| 3 | harold |
| 4 | tom |
+----+-------------+
这是 table :orders
+----------+-------------+---------+
| order_id | customer_id | total |
+----------+-------------+---------+
| 101 | 1 | 25 |
| 102 | 1 | 18 |
| 103 | 3 | 149 |
| 104 | 4 | 299 |
+----------+-------------+---------+
仅当表中有一行时,如何仅选择表中的行(通过确保匹配(并忽略重复项)?customersorderscustomers.idorders.customer_id