2つのmysqlテーブルがあります。
それらは次のように配置されます。
user_info
id | emailContact
_______________________
1 | person@example.com
3 | anotherPerson@example.com
user_biz_info
id | emailContact
_________________________
8 | business@example.com
9 | anotherBusiness@example.com
次のような情報の結果セットを作成するには、どのような種類の結合を使用しますか。
id | emailContact
________________________________
1 - person@example.com
3 - anotherPerson@example.com
8 - business@example.com
9 - anotherBusiness@example.com
私は以下を試しました:
SELECT p.id, p.emailContact, b.id, b.emailContact
FROM user_info p, user_business_info b
しかし、これは間違ったアプローチのようです。
誰かがこれで正しいアプローチを提案したり、このタイプのmysql結合をカバーするいくつかのチュートリアルの方向に私を向けることができるでしょうか。これは、この場合に必要であると私が想定しているためです。
私の質問を読んでくれてありがとう!