html
Cannot Drop Index Needed In A Foreign Key Constraint
- Get link
- X
- Other Apps
Cannot Drop Index Needed In A Foreign Key Constraint. To avoid this problem, remove the foreign key constraint before dropping the index (bug #70260). To drop the index you have to drop the foreign key first.

Mariadb [test]> set foreign_key_checks = 0; Such an index is created on the referencing table automatically if it does not exist. When there is only one index that can be used for the foreign key, it can't be dropped.
Create Table Mytable_A ( Id Tinyint Not Null Auto_Increment Primary Key, Name Varchar (255) Not Null, Unique (Name) ) Engine=Innodb;
I'm trying to remove the current index but keep getting the error mysql cannot drop index needed in a foreign key constraint. Drop index query to drop the unique index. Drop index statement to drop the unique index and it is dropped successfully.
To Drop The Index You Have To Drop The Foreign Key First.
Means, solution in simple terms is: Mariadb [test]> set foreign_key_checks = 0; 1553 cannot drop index 'idx_dce815b325c79a8c':
Needed In A Foreign Key Constraint #13.
By default, it will have the same name as the constraint. Mysql 错误号1553 mysql cannot drop index needed in a foreign key constraint,外键也会创建索引 26398; So, it's not possible to drop that index and keep the foreign key.
Needed In A Foreign Key Constraint The Foreign Key For Questionid Is Linked From The Image_Question Table To The Questionid In The Question Table.
Needed in a foreign key constraint. To avoid this problem, remove the foreign key constraint before dropping the index (bug #70260). Needed in a foreign key constraint.
Mysql Cannot Drop Index Needed In A Foreign Key Constraint.
By default, it will have the same name as the constraint. `alter table image_question drop index fk_questionsession` problem is though that i am receiving this error: Create table mytable_a ( id tinyint not null auto_increment primary key, name varchar.
Comments
Post a Comment