The Columns in table <table> do not match an existing primary key or unique constraint
- by Sven
I have 2 tables,
Stores - storeId (int) and year (int(4)) both Primary Keys.
fruit - fruitId - Primary Key and storeId.
I need to create 1 to many relationship between the Store and Fruit (Foreign Key held within Fruit) how ever I always get shown the error -
The Columns in table <table> do not match an existing primary key or unique constraint.
The type's are both int and named the same.
Any help would be appreciate in advance, many thanks.