MySQL Creating tables with Foreign Keys giving errno: 150

前端 未结 20 2363
深忆病人
深忆病人 2020-11-21 05:02

I am trying to create a table in MySQL with two foreign keys, which reference the primary keys in 2 other tables, but I am getting an errno: 150 error and it will not create

20条回答
  •  野的像风
    2020-11-21 05:10

    For people who are viewing this thread with the same problem:

    There are a lot of reasons for getting errors like this. For a fairly complete list of causes and solutions of foreign key errors in MySQL (including those discussed here), check out this link:

    MySQL Foreign Key Errors and Errno 150

提交回复
热议问题