Failed to add the foreign key in MySQL
Answered
I tried to create a foreign key in the table Customer , but got this error? What have i done wrong?
Please sign in to leave a comment.
See the same issue described on StackOverflow:
https://stackoverflow.com/questions/43511183/mysql-error-1822-failed-to-add-foreign-key-constraint-missing-index-for-contra
the column
CUSTOMER_CODEin CONTRACT table is neitheruniquenorprimarythat's why it is showing error.Thank you for help!!!