如果我有3個表讓我們說,table1,table2和table3。MySQL外鍵錯誤1025
table1: userID is a primary key.
table2: userID is a foreign key to table1.
table3: I can't get userID to be a foreign key to table 1?
ERROR 1025: Error on rename of.... (errno: 152)
問題是什麼?用戶ID都是INT和使用的是InnoDB所有表...
請顯示您嘗試使用的CREATE TABLE語句。 –
請發表'show create table table1'的輸出和table2和table3的相同 – Lars
我想到了 - 外鍵名稱在其他表格中似乎不能相同。 – Michael