Home > Database > Mysql Tutorial > body text

MyISAM和外键支持_MySQL

WBOY
Release: 2016-06-01 14:01:17
Original
1003 people have browsed it

问:MySQL中的MyISAM是否支持外键约束?我创建了一个InnoDB的表,并声明了外键,现在我想把它转换成MyISAM。这是否是可行的?如果可以的话,我该怎么做呢?

  答:外键约束位于MyISAM handler新增特性的to-do列表中,它们还没有被实现,并且可能还要持续一段时间。与此同时,您会发现InnoDB是实现大多数目的的一种良好的表handler。但是,如果您一定要将表转换成MyISAM,您将会失去执行外键的能力。想要将表转换为另一种handler,您可以使用如下语法:

  ALTER TABLE 表名 TYPE= MyISAM

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!