Foreign key won't create in dbForge Studio for MySQL: Cannot add or update a child row, a foreign key constraint fails

Practice




foreign key won't create Dbforge studio MYSQL Cannot add or update a child row: a foreign key constraint fails (``.first of all, the fields must fully match by type and by collation, and if possible accept null and default values

how IMPORTANT it is that the values already existing in the linked tables are real

that is, you're linking, for example

user.id_gr gr.id
1
2
0
0


but the gr table doesn't have a row with id=0...
so be careful

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Databases - MySql (Maria DB)"

Terms: Databases - MySql (Maria DB)