mysql 新建一个表,表中的字段名是否可以有 + -符号?

如题所述

字段名可用有 + - 这两个符号
create table t (`a+b` char(10),`a-b` char(10));
但在建表最好不要使用,使用会给你带来很多麻烦的。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-10-26
不能使用,还有些敏感的单词不能使用,如class、alter、table 等
第2个回答  2012-10-26
alter table student change physics physisc char(10) not null;
其中char(10) not null是你physisc字段的create_definition
相似回答