MYSQL创建外键遇见错误

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创建外键遇见错误

上一篇:[原创] 关于Modbus 两种CRC16的校验值算法 - 讨论


下一篇:Python web 框架:web.py 【数据库】