Cannot mySQL share a foreign key between tables?
I get error 1005 when inserting my tables. There's multiple tables referenc开发者_StackOverflow社区ing to the tables in my design made up in mySQL workbench, but doesn't this work? - a shared foreign contraint among several tables?
Table one is called languages
. It has a id column for each language in the database. Then we have productDescription
that has a language column which of course is referenced into the languages
table.
Is this the reason of why i am getting Error 1005?
Thanks,
UPDATE: I have verified that all referenced keys have the same datatype which is TINYINT NOT NULL UNSIGNED.
The foreign key names must be unique over the database. This could be it.
精彩评论