使用此设置命名SQL列是否存在问题_ - 例如:
NEW_ITEM量
因为如果我想将此列的类型从int更改为double,那么我会收到此错误:
**#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 ') NULL DEFAULT NULL at line 1**
答案 0 :(得分:1)
不允许使用减号作为不带引号的标识符:
不带引号的标识符中允许的字符:
ASCII:[0-9,a-z,A-Z $ _](基本拉丁字母,数字0-9,美元,下划线)
http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
您可以使用反引号转义列名,也可以使用下划线而不是减号。