The database looks at all the foreign keys to verify whether a foreign key already exists (mysql).
Find duplicate foreign key names, where used, SQL as follows:
select * from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where CONSTRAINT_NAME='NAME'
If no problem, rename it
Thank you
Read More:
- Solution of duplicate entry ‘value’ for key ‘field name’ in MySQL
- Mysql error when deleting the table structure: Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails
- The solution of duplicate entry ‘for key’ primary ‘when inserting data in MySQL
- Txt import MySQL: error 1062 (23000): duplicate entry ‘0’ for key ‘primary’
- E11000 duplicate key error collection in mongodb
- MySql ERROR CODE:1215 Cannot add the foreign key constraint
- Mongoose Error: e11000 duplicate key error collection, code: 11000
- MySQL:Foreign key fails with error Error Code: 1452.
- MySQL error code 1217 (ER_ROW_IS_REFERENCED): Cannot delete or update a parent row: a foreign key co
- Duplicate modifier for the method XXX in type XXX
- MySQL error 1451 23000 foreign key exception handling
- Duplicate class com.xxx.xxx Find in modules problem solving (Aidl interdependence problem)
- 1072 – Key column ‘xxx_id’ doesn’t exist in table
- Mysql error 1452 – Cannot add or update a child row: a foreign key constraint fails
- mysql ERROR 1050 (42S01): Table already exists
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- MySQL failed to add foreign key: SQL 1452 cannot add or update a child row:a foreign key constraint fails
- Duplicate entry ‘787192513’ for key ‘primary’
- About error 1005 (HY000) in MySQL: can’t create table ‘_______ ‘(errno: 150) fool’s plan
- MySQL error: can’t create table ‘..’( errno:150 )Solutions