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.
Duang!超快Wi-Fi来袭
2.
机器学习-补充03 神经网络之**函数(Activation Function)
3.
git上开源maven项目部署 多module maven项目(多module maven+redis+tomcat+mysql)后台部署流程学习记录
4.
ecliple-tomcat部署maven项目方式之一
5.
eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息
6.
Spark RDD的依赖于DAG的工作原理
7.
VMware安装CentOS-8教程详解
8.
YDOOK:Java 项目 Spring 项目导入基本四大 jar 包 导入依赖,怎样在 IDEA 的项目结构中导入 jar 包 导入依赖
9.
简单方法使得putty(windows10上)可以免密登录树莓派
10.
idea怎么用本地maven
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
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‘
>>更多相关文章<<