Mysql新表
我的桌子上有些疑问Mysql新表,mysql,sql,spring-security,foreign-keys,Mysql,Sql,Spring Security,Foreign Keys,我的桌子上有些疑问 CREATE TABLE user_roles( user_role_id int(10) unsigned not null, user_id int(10) unsigned not null, authority varchar(45) not null, PRIMARY KEY(user_role_id), KEY FK_user_roles (user_id), CONSTRAINT FK_user_
CREATE TABLE user_roles(
user_role_id int(10) unsigned not null,
user_id int(10) unsigned not null,
authority varchar(45) not null,
PRIMARY KEY(user_role_id),
KEY FK_user_roles (user_id),
CONSTRAINT FK_user_roles FOREING KEY (user_id) REFERENCES users (user_id))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
我得到以下错误:
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
'FOREING KEY (user_id) REFERENCES users (user_id)) ENGINE=InnoDB DEFAULT CHARSET=' at line 7
简单错误
外国的而不是外国的