gpt4 book ai didi

Mysql新建表

转载 作者:行者123 更新时间:2023-11-29 13:28:26 25 4
gpt4 key购买 nike

我对我的表有一些疑问

    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

最佳答案

简单的错误

外国不是外国

关于Mysql新建表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19819315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com