FSCockers
FSCockers

Reputation: 45

I cannot select a column to add a Referenced column in MySQL workbench when creating a Foreign Key

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: first Foreign Key

The second one looks like this:

Photo of problem

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

Answers (1)

FSCockers
FSCockers

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

Related Questions