mysql error1215


You have a foreign key constraint operating in both directions. When you're creating the tables the first to be created will fail because the second doesn't exist. I'm not even sure that MySQL will accept a circular reference like this. You should probably remove the foreign key constraint applied to mydb.store

However, if this is essential you can ask MySQL to ignore the foreign key checks while you create the table. Just execute

SET foreign_key_checks = 0;

before you create the tables and

SET foreign_key_checks = 1;

after you finish

阅读更多
个人分类: mysql
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

mysql error1215

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭