Re: Copy rows from one table into another table.
Dan wrote:
> Hi, I have two different database with the same schema.
>
> I want to save some rows from one table of Database A.
>
> Then insert these rows into the corresponding table in Database B.
> What is the best way to do that?
>
> Not sure if I can use mysqldump since mysqldump always try to drop the
> table before you insert
> the rows. But I need to keep the table in Database B. Thanks!
>
mysql5:
insert [ignore] into databaseB (
select * from databaseA
)
then, you have to deal with keys if some records are alrerady present in
databaseB...
|