mysql 无法设置外键 什么 reference什么 incompatable

alter table questioncommitResult add CONSTRAINT fk_questionCommit_person foreign key(uid) REFERENCES person(id);

用的类型一样, 字符集默认也是一样的,但是漏了一点,person表我用的是 bigint unsigned, 而 questioncommitResult 我用 bigint ,所以报错
建表时 也设置 bigint unsigned

发布了175 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43923045/article/details/105192508