700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > mysql建表Rferencing column ‘‘ and referenced column ‘ in foreign key constraint ‘‘ are incompatible.

mysql建表Rferencing column ‘‘ and referenced column ‘ in foreign key constraint ‘‘ are incompatible.

时间:2018-05-18 10:01:46

相关推荐

mysql建表Rferencing column ‘‘ and referenced column ‘ in foreign key constraint ‘‘ are incompatible.

今天建表时遇到了下面的字段类型不一致报错:

Referencing column ‘’ and referenced column ’ in foreign key constraint ‘’ are incompatible.

这句话翻译一下就是:

在外键约束“orders_ibfk_2”中引用列“staff_id”和引用列“id”不兼容。

那么把要创建的表的字段类型改成和staffer中的id的类型一致就行了。

见下图:

更改:

OK啦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。