首页 > 数据库技术 > 详细

MYSQL创建外键遇见错误

时间:2020-05-25 16:05:20      阅读:47      评论:0      收藏:0      [点我收藏+]

1:两个字段类型不一致,导致创建外键引用错误:

    ERROR 1215 (HY000): Cannot add foreign key constraint

[2020-05-25 15:51:11] [HY000][1215] Cannot add foreign key constraint
[2020-05-25 15:51:11] [HY000][150] Create table ‘xxxx/#sql-60_16‘ with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.
[2020-05-25 15:51:11] [HY000][1215] Cannot add foreign key constraint

  

MYSQL创建外键遇见错误

原文:https://www.cnblogs.com/leodaxin/p/12957389.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!