mysqldump table without dumping the primary key

后端 未结 10 1411

I have one table spread across two servers running MySql 4. I need to merge these into one server for our test environment.

These tables literally have millions of r

10条回答
  •  醉梦人生
    2020-12-24 02:05

    if you don't care what the value of the auto_increment column will be, then just load the first file, rename the table, then recreate the table and load the second file. finally, use

    INSERT newly_created_table_name (all, columns, except, the, auto_increment, column)
           SELECT all, columns, except, the, auto_increment, column
             FROM renamed_table_name
    

提交回复
热议问题