开发者

Export mysql dump file, such that statments are in the order of dependency

I need to create a dump file such t开发者_JAVA百科hat when i execute it, i have no depency issues

  1. tables run before queries
  2. parent tables before child tables etc
  3. no failed insert due to foreign key failures


Two tables may refer each other with FK so not always possible to create and insert "parent first".

Use mysqldump . It will disable foreign keys before importing data and enable afterward. (this is also much faster).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜