为了账号安全,请及时绑定邮箱和手机立即绑定

mysql建 表语句错误

mysql建 表语句错误

慕圣7574856 2020-03-23 12:02:42
create table user_role(uid int(11) not null comment "用户编号",  rid int(11) not null comment "角色编号",   primary key(uid, rid),   key "FK_Reference_10" (rid),   constraint "FK_Reference_10" foreign key (rid) references role (id),   constraint "FK_Reference_13" foreign key (uid) references user (id))   engine=InnoDB default charset=utf8;
查看完整描述

1 回答

?
慕圣7574856

TA贡献5条经验 获得超0个赞

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"FK_Reference_10" (rid), constraint "FK_Reference_10" foreign key (rid) referenc' at line 1


查看完整回答
反对 回复 2020-03-23
  • 1 回答
  • 0 关注
  • 779 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信