开发者

Export table data without Primary Key

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

The reason is that I have data on my localhost that needs to be inserted in a remote database (remote and local db have the same structure). But on the remote db, th开发者_C百科e table already has data, and they will be primary key conflicts if I try to add the data from my localhost.

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

I used this method in the past, but it's annoying to have to create a new table to make the transfer...

It surprises me that I can't export data from a table while omitting a column, in this case, the primary key column. Been looking the mysql documentation but it wasn't helpful...

Any idea?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜