1

couldn't manage to summaries my question in the title...

I have a database, full of data.

I have another database, full of data.

The two databases have the exact same structure.

I need to export data from one and put it all into the other.

I have exported 'data only' but of course that's not enough.

I need the imported data's table's id columns to all change to correspond as the data is being added to tables with existing data.

I couldn't see one, but i am hoping there is a setting in the export settings for this? Or in the import settings at the other end?

If not, what is the easiest way to go about it, please??

Thanks

yolo191919
  • 11
  • 2

1 Answers1

0

Assuming your id-column is an AUTO_INCREMENT PRIMARY KEY simply do a SELECT without the key and insert the result in the new table:

 INSTERT INTO table2 (col2, col3, col4)
 SELECT col2, col3, col4 FROM table1
Benvorth
  • 7,416
  • 8
  • 49
  • 70