4

MySQL 1091 can‘t drop check that column/key exists

 1 year ago
source link: https://segmentfault.com/a/1190000039682297
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

大致报错内容

MySQL 1091 can't drop check that columnkey exists

在navicat中创建外键时报错(想为myorder表创建外键userId,关联user表的主键userId)

关于navicat创建外键具体步骤,参见此文:navicat 数据表添加外键

可能的原因(任意一个)

1.myorder表没有创建字段userId
2.myorder表刚创建完,虽然有字段userId,但是还没保存myorder表,就立马去设置外键。

创建完myorder表后(记得要先创建userId字段),保存好。再为myorder表添加外键。

[[Err] 1091](http://t.zoukankan.com/hzcya1...


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK