When you import data, a foreign key error is often reported. This is because the table has foreign key constraints, but the data imported may not be complete yet, so this error occurs. This problem can be solved through FOREIGN_KEY_CHECKS. Its usage is as follows: setFOREIGN_KEY_CHECKS0; # Set it to not check the foreign key constraints before import .... # Import
When you import data, a foreign key error is often reported. This is because the table has foreign key constraints, but the data imported may not be complete yet, so this error occurs. This problem can be solved through FOREIGN_KEY_CHECKS. The usage is as follows: set FOREIGN_KEY_CHECKS = 0; # set it to not check the foreign key constraints before import .... # Import
When you import data, a foreign key error is often reported. This is because the table has foreign key constraints, but the data imported may not be complete yet, so this error occurs.
This problem can be solved by FOREIGN_KEY_CHECKS. The usage is as follows:
Set FOREIGN_KEY_CHECKS = 0; # set to not check foreign key constraints before import .... # Import data set FOREIGN_KEY_CHECKS = 1; # restore check for foreign key constraints after import
[Article Title] foreign key constraints during mysql Data Import
[Author] Zeng jiansheng
[Author mailbox] zengjiansheng1@126.com
[Author's QQ] 190678908
[Author's blog] blog.csdn.net/newjueqi