我们可以将表名称为“option”在MySQL? [英] Can we have the table name as "option" in MySQL?
问题描述
我对MYSQL非常非常新,我试图创建一个名为option的表。
我的SQL查询是:
创建表选项(
id int not null主键auto_increment,
choice varchar(30)
)
执行此查询时,错误
错误代码:1064
您的SQL语法有错误;检查对应于您的MySQL服务器版本的手册以获得正确的语法在第1行使用near选项(
id int not null主键auto_increment,
选择varchar(30)
)'
(0 ms taken)
如果我尝试使用表名为choice 我们可以在mysql中将表格名称设为option吗? > 选择不同的名称(在RDBMS中不是保留字),并保存自己和任何其他人头痛。 I am very, very new to MYSQL.I tried to create a table named "option".
My SQL Query is : create table option( id int not null primary key auto_increment, choice varchar(30) ) While executing this query it shows the following error Error Code : 1064
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 'option(
id int not null primary key auto_increment,
choice varchar(30)
)' at line 1
(0 ms taken) If I try with the table name as "choice" it is working. can we have the table name as "option" in mysql? thanks Pick a different name (one that isn't a reserved word in your RDBMS) and save yourself and whoever else might work on it many headaches. 这篇关于我们可以将表名称为“option”在MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!