更新时间:2023-02-05 11:34:33
你的ALTER TABLE table ADD CONSTRAINT foreign_key FOREIGN KEY
是一样的,所以它们不是错误的原因.
Your ALTER TABLE table ADD CONSTRAINT foreign_key FOREIGN KEY
are the same, so they cannot be the reason of the error.
(...文本被删除)
无法解释这种奇怪的行为.可以建议一个解决方法:
Cannot explain that strange behavior. Can suggest a workaround:
SET FOREIGN_KEY_CHECKS = 0;
DELETE FROM A WHERE ID=1;
SET FOREIGN_KEY_CHECKS = 1;