mysql知识系列:数据库名称带减号- 创建修改删除时

说明:

        create database a-b,会提示报错

        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 '-b' at line 1

解决办法:

        -视为命令符,如果名称带有时,需要将数据库名用``包起来,create database `a-b`

你可能感兴趣的:(mysql,数据库,mysql)