开发者

Cannot mySQL share a foreign key between tables?

开发者 https://www.devze.com 2022-12-29 17:51 出处:网络
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 foreig

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消