You get a bonus - 1 coin for daily activity. Now you have 1 coin

Foreign key constraint error when adding a foreign key in MySQL

Practice




constraint foreign key mysql error when adding a foreign key?
most likely you chose the "set to null" action on delete or update of the record

and probably the fields have different data types, for example you're linking keys with numeric fields, but null is allowed in one and not in the other, or you're even trying to link a string field with a numeric one

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)