MySQL Forums
Forum List  »  Newbie

Merge Tables ?
Posted by: Eqa Rubi
Date: August 17, 2005 09:46PM

Has anyone tried to merge two tables in MySQL ? It seems to be a headache !

What I have are two tables that I want to merge into one.

Lets take an example ...

TABLE A
-----------
|NAME|TOWN|
------------------------
1.|PIET | KLAWER |
2.|JOHN | PARYS |
3.|KOOS| | DURBAN|

TABLE B
----------
TOWN| PCODE|
-----------------
1.KLAWER|1212|
2.PARYS|1234
3.DURBAN|4000

Ok, assuming you understand and my Graphics turn out OK,

I want to now create TABLE C - Which should look like ..

TABLE C
-----------
|NAME|TOWN|PCODE
------------------------
1.|PIET | KLAWER |1212
2.|JOHN | PARYS |1234
3.|KOOS| | DURBAN|4000


Any help will be much appreciated !

Options: ReplyQuote


Subject
Written By
Posted
Merge Tables ?
August 17, 2005 09:46PM
August 18, 2005 03:17AM
August 18, 2005 12:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.