MySQL cannot create foreign key constraint

后端 未结 12 2267
夕颜
夕颜 2020-12-08 12:39

I\'m having some problems creating a foreign key to an existing table in a mysql database.

I have the table exp:

+-------------+--------         


        
12条回答
  •  甜味超标
    2020-12-08 13:27

    Referencing the same column more than once in the same constraint also produces this Cannot find an index in the referenced table error, but can be difficult to spot on large tables. Split up the constraints and it will work as expected.

提交回复
热议问题