Reputation: 45
I am trying to create a foreign key in MySQL Workbench and when I try and add a Reference Column it doesn't tick the box beside the column. This is happening for the second Foreign Key that I'm creating in this table. I was able to create one before but the second one doesn't seem to work. Here is what the first FK looks like:
The second one looks like this:
As you can see there is no tick in the box and when I select the reference column it will reset. Is this a bug or have I done something wrong?
Upvotes: 0
Views: 2227
Reputation: 45
I realised that the data types were not the same. In the table that i was creating the FK the data type was int(11)
however in the referencing table it was tinyint(4)
.
Upvotes: 1