mysql中的错误 求解
mysql>createtableuserHorse(userIdvarchar(100)notnull,horseIdvarchar(20)notnull,primar...
mysql> create table userHorse(
userId varchar(100) not null,
horseId varchar(20) not null,
primary key(userId,horseId),
foreign key(userId) references user(userId),
foreign key(horseId) references horse(horseId)
);
ERROR 1215 (HY000): Cannot add foreign key constraint 展开
userId varchar(100) not null,
horseId varchar(20) not null,
primary key(userId,horseId),
foreign key(userId) references user(userId),
foreign key(horseId) references horse(horseId)
);
ERROR 1215 (HY000): Cannot add foreign key constraint 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询