mysqldump table without dumping the primary key

后端 未结 10 1456

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 01:52

    You can create a view of the table without the primary key column, then run mysqldump on that view.

    So if your table "users" has the columns: id, name, email

    > CREATE VIEW myView AS
      SELECT name, email FROM users
    

    Edit: ah I see, I'm not sure if there's any other way then.

提交回复
热议问题