Q
Problem solve Get help with specific problems with your technologies, process and projects.

MyISAM and foreign key support

Are foreign key constraints supported in MyISAM of MySQL? I have created a table using InnoDB, declaring the foreign key, and now I want to convert that table to MyISAM. Is it possible, and if so, how can I do it?

While FOREIGN KEY constraints are on the to-do list of features to be added to the MyISAM table handler, they are not yet implemented and may not be for some time. In the meantime you may find InnoDB to be a fine table handler for most purposes, but if you absolutely must move the table to MyISAM then you will lose the ability to enforce foreign keys.

To convert a table to a different table handler, the following syntax can be used:

ALTER TABLE tablename TYPE = MyISAM;


Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

SearchServerVirtualization

SearchCloudComputing

Close