Mysql无法创建外键的原因汇总_查看MySQL创建外键约束失败详细原因的方法
以下是引用片段:
LATEST FOREIGN KEY ERROR
————————
081210 11:57:40 Error in foreign key constraint of table dbname/tablename:
foreign key (`gid`, `uid`) references `table2`(`gid`, `uid`)
) ENGINE = InnoDB:
Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.
Note that the internal storage type of ENUM and SET changed in
tables created with >= InnoDB-4.1.12, and such columns in old tables
cannot be referenced by such columns in new tables.
See http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html
for correct foreign key definition.
總結
以上是生活随笔為你收集整理的Mysql无法创建外键的原因汇总_查看MySQL创建外键约束失败详细原因的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 两种参数类型_布尔参数这些缺点不能忍?不
- 下一篇: php 谷歌翻译api_武汉武昌区地质勘