0
我試過創建一個表,有2個外鍵但是當我試圖寫入到mysql時,出現錯誤提示「ERROR 1005(HY000):Can not創建表(errno:150)「有人幫我嗎?這裏是我的表:用外鍵創建sql表錯誤號:150
create table store (
StoreName varchar(255),
Category varchar(20),
primary key(StoreName,Category));
create table shopps (
StoreName varchar(255),
Category varchar(20),
primary key(StoreName,Category),
foreign key(StoreName) References store);
foreign key(Category) References store);
在未經編輯的問題是另一個名稱(購物)的表格。您確定發生錯誤是因爲商店或購物? – LINQ2Vodka