我有一個疑問,我在做什麼毛病如下表聲明:錯誤在MySQL上創建聲明
的MySQL返回錯誤150
DROP table usuario;
DROP table MiTabla;
CREATE TABLE usuario(
id smallint unsigned auto_increment primary key,
name varchar(20) not null
)ENGINE=InnoDB;
Insert into usuario (NAME) VALUES ('Antonio'),('Jose'),('Manuel');
CREATE TABLE MiTabla(
id smallint unsigned auto_increment primary key,
name varchar(20) not null,
foreign key (name) REFERENCES usuario (name)
) ENGINE = InnoDB;
我的懷疑來自於外鍵聲明 – user2862454
你做一個搜索在Stackoverflow?似乎有幾個職位關於錯誤150. – jcoppens