当前位置:Gxlcms > 数据库问题 > Mysql使用Navicat建立外键时报错cannot add foreign key constraint分析

Mysql使用Navicat建立外键时报错cannot add foreign key constraint分析

时间:2021-07-01 10:21:17 帮助过:16人阅读

 

技术分享图片

1)要关联的字段类型或长度不一致。

2)两个要关联的表编码不一样。

3)某个表已经有记录了。

4)将“删除时”和“更新时”都设置相同,如都设置成CASCADE。

Mysql使用Navicat建立外键时报错cannot add foreign key constraint分析

标签:size   font   cascade   时报   设置   mysq   const   报错   ann   

人气教程排行