In mySQL, Is it possible to SELECT from two tables and merge the columns?
- by Travis
If I have two tables in mysql that have similar columns...
TABLEA
id
name
somefield1
TABLEB
id
name
somefield1
somefield2
How do I structure a SELECT statement so that I can SELECT from both tables simultaneously, and have the result sets merged for the columns that are the same?
So for example, I am hoping to do something like...
SELECT name, somefield1 FROM TABLEA, TABLEB WHERE name="mooseburgers";
...and have the name, and somefield1 columns from both tables merged together in the result set.
Thank-you for your help!