且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL 无法删除外键约束中所需的索引

更新时间:2023-02-04 10:18:50

您必须删除外键.MySQL 中的外键自动在表上创建索引(有一个 SO Question 主题).

You have to drop the foreign key. Foreign keys in MySQL automatically create an index on the table (There was a SO Question on the topic).

ALTER TABLE mytable DROP FOREIGN KEY mytable_ibfk_1 ;