-2
CREATE TABLE IF NOT EXISTS super(
id int (20) PRIMARY KEY AUTO_INCREMENT,
cod varchar(5)
);
CREATE TABLE IF NOT EXISTS super2(
id2 int (20) PRIMARY KEY AUTO_INCREMENT,
cod2 varchar(5),
FOREIGN KEY (cod2) REFERENCES super(cod)
);
我不能創建共享表請幫助和感謝 與國外KEY錯誤號150 ...我不能參照其它表的mysql
歡迎來到Stack Overflow!請務必在發佈之前搜索存檔。這是[MySQL創建帶有外鍵的表給errno:150]的副本。(http://stackoverflow.com/questions/1457305/mysql-creating-tables-with-foreign-keys-giving-errno-150) – Leigh 2014-09-30 01:09:29