我正在尝试删除带有问号符号的列:
ALTER TABLE player DROP is_playing?;
结果:
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 '?' at line 2
你知道其他方法吗?
谢谢
最佳答案
使用反引号转义具有特殊名称或名称 reserved keywords 的列或表名称在 MySQL 中。
并使用 column
关键字:
ALTER TABLE player DROP column `is_playing?`;
关于MySQL:删除带有问号符号的列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18161317/