Export table from one database and import / merge into another database using phpMyAdmin
I have DB1 with a table called "mytable" and I want to export it with all its data to DB2 which already has a table called "mytable".
So basically concatenate the data together. But it might seem like doing it, if I export and import, I always get the following error Table "mytable" already exists.
What is the best way to do this.
thank
Ben
+3
source to share
1 answer
Using phpmyadmin -
- DB1 -> goto table -> Export table
- DB2 -> goto table -> Import table
Cause:
- The exported sql file contains -
CREATE TABLE IF DON'T EXIST
table_name
(...
- AND
INSERT INTO table_name (...
- Hence, if the table already exists, the new rows will simply be inserted into the table.
0
source to share