且构网

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

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

更新时间:2023-02-04 09:53:28

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

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 ;