-3
這裏表SEARCHAUTHOR refrying CATALOGUEBASE但代碼產生以下錯誤:創建外鍵獲取錯誤(錯誤CIDE:1005)
Error Code: 1005. Can't create table 'easylibdb1.SEARCHAUTHOR' (errno: 150)
表結構的CATALOGUEBASE
表
CREATE TABLE IF NOT EXISTS CATALOGUEBASE(
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
TITLE VARCHAR(250),
SUBTITLE VARCHAR(250),
AUTHOR VARCHAR(100),
EDITION VARCHAR(500) DEFAULT '',
TITLENUMBER VARCHAR(500),
PRIMARY KEY (ID)
);
和SEARCHAUTHOR
表
CREATE TABLE IF NOT EXISTS SEARCHAUTHOR(
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
TITLENUMBER VARCHAR(500),
AUTHOR VARCHAR(250) DEFAULT '',
SEQUENCE INT UNSIGNED,
PRIMARY KEY (ID),
FOREIGN KEY (TITLENUMBER) REFERENCES CATALOGUEBASE (TITLENUMBER)
);
提前致謝。
請不要SHOUT。 – GolezTrol
我刪除了大喊。 –
@ L-Three:出錯? – Roopendra