Open OrdinaryYZH opened 4 years ago
e.g. mysql:yeyztest 22:35:39>>insert into fk_test_2 values (3,3); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (yeyztest.fk_test_2, CONSTRAINT fk_test_2_ibfk_1 FOREIGN KEY (uid) REFERENCES fk_test_1 (id))
yeyztest
fk_test_2
fk_test_2_ibfk_1
uid
fk_test_1
id
e.g. mysql:yeyztest 22:35:39>>insert into fk_test_2 values (3,3);
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (
yeyztest
.fk_test_2
, CONSTRAINTfk_test_2_ibfk_1
FOREIGN KEY (uid
) REFERENCESfk_test_1
(id
))