MYSQL - Adding result set A to result set B? Please see my example

Posted by BlackberryFan on Stack Overflow See other posts from Stack Overflow or by BlackberryFan
Published on 2012-06-11T10:34:30Z Indexed on 2012/06/11 10:40 UTC
Read the original article Hit count: 136

Filed under:
|

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!!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about join