【发布时间】:2016-11-19 15:14:34
【问题描述】:
我已将 csv 导入 MySQL。 PHPMyAdmin 帮助创建了一个名为 TABLE 8 的表(带有空格)。
当我尝试在 SQL 中重命名时:
RENAME TABLE 8 to gender
我得到错误:
#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 '`TABLE 8` to `gender`' at line 1
我已经尝试过反引号、引号……似乎一切……
我猜是空间造成了问题,但我没有想法。
【问题讨论】:
-
表
table 8的名称是什么?Rename table 'table 8' to 'gender'其中刻度是反引号 -
是的,表 8 @xQbert
-
谢谢@xQbert - 明白了。干杯。 :-)
-
@stilts77 所有的程序员都会犯错误,有时是非常简单的错误!
标签: mysql sql syntax-error ddl table-rename