【发布时间】:2017-03-22 23:08:13
【问题描述】:
我想知道如何在 mysql 中删除包含空格的列。 尝试了以下,得到了以下异常:
alter table test17 drop column [added column2];
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 '[added column2]' at line 1
alter table test17 drop column 'added column2';
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 ''added column2'' at line 1
alter table test17 drop column (added column2);
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 '(added column2)' at line 1
谢谢:)
【问题讨论】:
-
列名是否包含空格?
标签: mysql linux mysql-error-1064