今天建表时遇到了下面的字段类型不一致报错:
Referencing column ‘’ and referenced column ’ in foreign key constraint ‘’ are incompatible.
这句话翻译一下就是:
在外键约束“orders_ibfk_2”中引用列“staff_id”和引用列“id”不兼容。
那么把要创建的表的字段类型改成和staffer中的id的类型一致就行了。
见下图:
更改:
OK啦!
时间:2018-05-18 10:01:46
今天建表时遇到了下面的字段类型不一致报错:
Referencing column ‘’ and referenced column ’ in foreign key constraint ‘’ are incompatible.
这句话翻译一下就是:
在外键约束“orders_ibfk_2”中引用列“staff_id”和引用列“id”不兼容。
那么把要创建的表的字段类型改成和staffer中的id的类型一致就行了。
见下图:
更改:
OK啦!