在新建数据表的时候表名和列名不能有引号,带有引号就会报错没有引号就能创建成功不知道啥情况。
来源:2-6 SQL语法基础-创建及修改表

哈哈笑笑9632300
2021-06-27
在新建数据表的时候表名和列名不能有引号,带有引号就会报错没有引号就能创建成功不知道啥情况。
mysql> create table ‘my_user’(
‘id’ int not null auto_increment,
‘name’ varchar(200) unique not null,primary key (id)
);
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 ‘‘my_user’(‘id’ int not null auto_increment, ‘name’ varchar(200) unique not null,’ at line 1
写回答
1回答
-
注意是反引号,键盘左上角那个键
00