3780 - Referencing column ‘assagement_id‘ and referenced column ‘id‘ in foreign key constraint ‘FKhl

一、操作

1、修改表的类型

alter table t_user modify column  assagement_id VARCHAR(111);

2、错误

3780 - Referencing column 'assagement_id' and referenced column 'id' in foreign key constraint 'FKhlaffssam5nthcbq199w4tccp' are incompatible., Time: 0.009000s

在这里插入图片描述
3、解决方法

删除外键

ALTER TABLE t_user 
DROP FOREIGN KEY FKhlaffssam5nthcbq199w4tccp;

再次执行

alter table t_user modify column  assagement_id VARCHAR(111);

猜你喜欢

转载自blog.csdn.net/qq_40996741/article/details/109283195