MySQL Foreign Key, Can't create table (errno: 150)

后端 未结 2 2327
轮回少年
轮回少年 2021-02-20 09:25

I am trying to build the database and tables for my system. But I found that if I don\'t add the foreign key in the codes. There is no error. I\'ve used many method try to make

2条回答
  •  余生分开走
    2021-02-20 10:20

    Above answer is correct, but this error can also happen if the table your foreign key is referencing is MyISAM instead of innoDB.

提交回复
热议问题