ITeye博客

MySQL加外键报错Foreign key constraint is incorrectly formed

wangcheng · 2010-04-28 15:08 · Linux · 数据库 · Markdown

在服务器上给MySQL中的表加外键,报错

 

SQL Error (1005): Can't create table 'xxxxx' (errno: 150) Foreign key constraint is incorrectly formed

 

检查了SQL,没错,然后发现其中一个表的引擎是MyISAM,将其改为InnoDB后,运行通过

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。