mysql知识系列:数据库名称带减号- 创建修改删除时
视为命令符,如果名称带有时,需要将数据库名用``包起来,create database `a-b`create database a-b,会提示报错。
·
说明:
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`
更多推荐




所有评论(0)