【发布时间】:2014-02-12 06:58:26
【问题描述】:
我有两个 mysql 表:table_1 和 table_2。
table_1:
| c_id | name | email |
| 1 | tom | t@t.com |
table_2:
| a_id | c_id | address | street |
| 1 | 1 | 67 | home |
| 2 | 1 | 68 | main |
如何创建将选择 table_1.name、table_1.email、table_2.address 和 table_2.street 的 mysql 查询只返回一条记录,例如:
| name | email | address | street |
| tom | t@t.com | 67 | home |
感谢您的任何建议。 问候,T
【问题讨论】:
-
什么意思是“只有一条记录”。如何确定应该退回哪些?