Exporting/importing table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ville Rontti

    #1

    Exporting/importing table

    Hi

    I have two separate databases (A and B). Both databases have one table (A).
    How I could transfer the contents of table A from Database A to database B
    table A? The tables are same.

    Ville


  • Erik Tank

    #2
    Re: Exporting/importing table

    On Sun, 18 Jan 2004 14:58:21 GMT, "Ville Rontti"
    <ville.rontti@p p.inet.fi> wrote:
    [color=blue]
    >Hi
    >
    >I have two separate databases (A and B). Both databases have one table (A).
    >How I could transfer the contents of table A from Database A to database B
    >table A? The tables are same.
    >
    >Ville
    >[/color]

    Do the tables have a unique identifier?

    If not then you can just use mysqldump to dump table A, make sure that
    it doesn't try to recreate the table, use awk, sed, vi, etc to change
    each reference of table A to table B, then reload the data.

    If it does then you will probably have to write a program that simply
    takes all the information form A (minus the unique identifier) and
    inserts it into B.

    Comment

    Working...