MySQL命令行下操作插入数据时, 数据库名中含有中横线出错

来源:互联网 发布:北京程序员工资 知乎 编辑:程序博客网 时间:2024/04/29 15:50
MySQL命令行下操作插入数据时, 数据库名中含有中横线出错

数据库都是存在的情况下,以下是在命令行下执行的操作:

mysql> insert into all.items select * from sz-jk.items;

提示错误:
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 '-jk.i
tems' at line 1

中横线是否需要转义,请问知道的朋友解答一下
0 0