JavaShuo
栏目
标签
【Mysql】Error 1826: Duplicate foreign key constraint 错误
时间 2021-01-11
栏目
MySQL
繁體版
原文
原文链接
在一个数据库中建了若干张表,其中的外键索引重复了,才导致这个问题: 例如,A表有一个字段 aid,B表有一字段为bid 和 aid,其中aid为外键,联系到A表,此时如果再新建一个C表,字段为 cid 和 aid,其中aid也为联系A表的外键,默认下生成的index索引名是一样的,故报错! 解决办法:添加外键设置一下不同的index索引名就行
>>阅读原文<<
相关文章
1.
ERROR 1215: Cannot add foreign key constraint
2.
错误代码: 1215 Cannot add foreign key constraint
3.
错误:mysql foreign key errno 150
4.
Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "veh
5.
1215 - Cannot add foreign key constraint
6.
MySQL 不能添加外键:Cannot add foreign key constraint错误
7.
1215-Cannot add the foreign key constraint
8.
Python之sqlalchemy错误:pymysql.err.IntegrityError) (1215, 'Cannot add foreign key constraint')
9.
mysql foreign key
10.
mysql--sqlalchemy.exc.IntegrityError: (IntegrityError) (1215, ‘Cannot add foreign key constraint‘
更多相关文章...
•
MySQL外键约束(FOREIGN KEY)
-
MySQL教程
•
SQL FOREIGN KEY 约束
-
SQL 教程
•
漫谈MySQL的锁机制
•
RxJava操作符(五)Error Handling
相关标签/搜索
duplicate
constraint
foreign
mysql错误
错误
error
key
key+
MySQL错误系列
MySQL
MySQL教程
Redis教程
PHP 7 新特性
mysql
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
【Java8新特性_尚硅谷】P1_P5
2.
SpringSecurity 基础应用
3.
SlowFast Networks for Video Recognition
4.
074-enable-right-click
5.
WindowFocusListener窗体焦点监听器
6.
DNS部署(二)DNS的解析(正向、反向、双向、邮件解析及域名转换)
7.
Java基础(十九)集合(1)集合中主要接口和实现类
8.
浏览器工作原理学习笔记
9.
chrome浏览器构架学习笔记
10.
eclipse引用sun.misc开头的类
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
ERROR 1215: Cannot add foreign key constraint
2.
错误代码: 1215 Cannot add foreign key constraint
3.
错误:mysql foreign key errno 150
4.
Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "veh
5.
1215 - Cannot add foreign key constraint
6.
MySQL 不能添加外键:Cannot add foreign key constraint错误
7.
1215-Cannot add the foreign key constraint
8.
Python之sqlalchemy错误:pymysql.err.IntegrityError) (1215, 'Cannot add foreign key constraint')
9.
mysql foreign key
10.
mysql--sqlalchemy.exc.IntegrityError: (IntegrityError) (1215, ‘Cannot add foreign key constraint‘
>>更多相关文章<<