Export table data without a primary key

I want to export data from a sql table, but I do not want the primary key to be exported.

The reason is because I have data on my local host that needs to be inserted into the remote database (the remote and local db have the same structure). But on the remote db, the table already has data, and they will be primary key conflicts if I try to add data from my local host.

This question has been addressed here before: table-without-dumping-the-primary-key .

I have used this method in the past, but it was not pleasant for me to create a new table for the transfer ...

It amazes me that I cannot export data from a table, omitting the column, in this case the primary key column. Looked at mysql documentation, but that didn't help ...

Any idea?

+3
source share
1 answer

Can you create a VIEW without a primary key and then export the VIEW DATA?

+2
source

All Articles