我正在尝试解决我的问题...即我无法重命名导入的名为“TABLE 12”的表。我得到了回应:
#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 12' TO categories' at line 1
我正在尝试解决我的问题...即我无法重命名导入的名为“TABLE 12”的表。我得到了回应:
#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 12' TO categories' at line 1
使用 ` 而不是 ' 来引用 MySQL 中的数据库/表/字段名。例如:
RENAME TABLE `TABLE 12` TO `categories`
在系统相关对象上使用反引号。
假设您的表名是TABLE 12
:
RENAME TABLE `TABLE 12` TO `categories`
假设您的表名是12
:
RENAME TABLE `12` TO `categories`
尝试使用反引号 (`) 而不是引号 (')。
RENAME TABLE `TABLE 12` TO `Categories`