ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

后端 未结 21 2114
野性不改
野性不改 2020-11-22 07:01

I have created tables in MySQL Workbench as shown below :

ORDRE table:

CREATE TABLE Ordre (
  OrdreID   INT NOT NULL,
  OrdreDato DA         


        
21条回答
  •  忘掉有多难
    2020-11-22 07:33

    in the foreign key table has a value that is not owned in the primary key table that will be related, so you must delete all data first / adjust the value of your foreign key table according to the value that is in your primary key

提交回复
热议问题