MYSQL - Adding result set A to result set B? Please see my example
- by BlackberryFan
I have two mysql tables.
They are laid out in this manner:
user_info
id | emailContact
_______________________
1 | [email protected]
3 | [email protected]
user_biz_info
id | emailContact
_________________________
8 | [email protected]
9 | [email protected]
What kind of join would I use to create a result set of information like this:
id | emailContact
________________________________
1 - [email protected]
3 - [email protected]
8 - [email protected]
9 - [email protected]
I have tried the following:
SELECT p.id, p.emailContact, b.id, b.emailContact
FROM user_info p, user_business_info b
But it seems that this is an incorrect approach.
Would someone be able to suggest the correct approach in this or possibly point me in the direction of some tutorials that cover this type of mysql join, as this is what I assume is needed in this case.
Thanks for your time in reading through my question!!