MySQL Forums
Forum List  »  Newbie

How to merge two or three different tables in one?
Posted by: mladja04 Nik
Date: September 07, 2008 07:24PM


I have big problem, I dont know how to merge two or more tables (with it data) into one new.
I need to transform my old mysql from my old site into new mysql structure for new site. What I want to do is to transform and copy only user details table from old to new. In old mysql user details are stored into 3 tables with some columns and in new table I have only one table with some columns. That 3 tables have same number of data rows and I array it by ID number. Because I dont need all columns from my user tables from old mysql, I will delete unnecessary columns and leave columns which I need for new table.

Now question, how I to merge this three tables to I get only one with certain table structure?

Too, I need when merge to copy and all user data which are now stored into that 3 tables and that user data to be merged.
Database is MyISAM, table 1, 2 and 3 had some same columns (ID of user and user status) but I delete it from table 2 and 3 because I need only one of it in new table.

Can anyone help me please?

Thank you very much, Mladen

Options: ReplyQuote

Written By
How to merge two or three different tables in one?
September 07, 2008 07:24PM

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.