Mysql 我的创建表查询有什么问题?
我正在尝试创建表用户,但出现错误。我的代码是:Mysql 我的创建表查询有什么问题?,mysql,Mysql,我正在尝试创建表用户,但出现错误。我的代码是: CREATE TABLE users ( id int AUTO_INCREMENT NOT_NULL, email varchar(255) UNIQUE NOT_NULL, password varchar(255) NOT_NULL, PRIMARY KEY (id) ); 错误是: You have an error in your SQL syntax; check the manual that cor
CREATE TABLE users (
id int AUTO_INCREMENT NOT_NULL,
email varchar(255) UNIQUE NOT_NULL,
password varchar(255) NOT_NULL,
PRIMARY KEY (id)
);
错误是:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
email varchar(255) UNIQUE NOT_NULL,
password varchar(255) NOT_NULL,
...' at line 2
使用
非空
而不是非空
CREATE TABLE users (
id int AUTO_INCREMENT NOT NULL,
email varchar(255) UNIQUE NOT NULL,
password varchar(255) NOT NULL,
PRIMARY KEY (id)
);
NOT\u NULL
语法无效,请尝试使用NOT NULL
哦,对了,谢谢!它起作用了