原文:mysql执行带外键的sql文件时出现mysql ERROR 1215 (HY000): Cannot add foreign key constraint的解决

ERROR HY : Cannot add foreign key constraint 最近在建表时遇到了这个错误,然后找了下找到了解决办法,记录下: 本来是要建两张表: create table department id int , name varchar create table employee id int primary key auto increment, name varc ...

2018-04-14 11:15 0 7821 推荐指数:

查看详情

MySql添加报错:Cannot add foreign key constraint

设计的界面有七列:1、名(name):可以不填,保存时会自动生成。2、栏位(FieldName):要设置的3、参考数据库(Reference DataBase):关联的数据库4、被参考表(Reference Table):关联的表5、参考栏位(Forgin filed Names ...

Thu Jan 17 17:49:00 CST 2019 0 2856
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM