Cannot drop index needed in a foreign key constraint

When you receive the message
"MySQL Cannot drop index needed in a foreign key constraint"
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;

Comments

Popular posts from this blog

Play video inside OpenGL ES by using MediaCodec