Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有表 A(innoDB)和表 B(MyISAM)。当我将外键从 A 添加到 B 时,它会报告:
ERROR 1005: Can't create table (errno: 150)
为什么?
MyISAM不支持外键约束。
两个表都需要是 InnoDB。
首先将引擎更改为 InnoDB。