Error 1215 Cannot add foreign key constraint

后端 未结 2 1837
情深已故
情深已故 2021-01-24 11:32

Table CARGO

DROP TABLE IF EXISTS \"hibernatecurso\".\"cargo\";
CREATE TABLE  \"hibernatecurso\".\"cargo\" (
  \"idcargo\" int(11) NOT NULL DEFAULT \'0\',
  \"fun         


        
2条回答
  •  甜味超标
    2021-01-24 11:55

    I had the same kind of issue and I fixed it by making sure that collation and types matched in both FK and the parent PK.

提交回复
热议问题