我正在尝试在两个单词之间创建一个带有“-”的数据库,它应该可以正常工作,但事实并非如此。这是日志文件:
mysql> create database test1;
Query OK, 1 row affected (0.00 sec)
mysql> show databases
-> ;
+-----------------------+
| Database |
+-----------------------+
| information_schema |
| mifos |
| mifosplatform_tenants |
| mifostenant |
| mifostenant_default |
| mysql |
| performance_schema |
| sakila |
| test |
| test1 |
| testing |
| world |
+-----------------------+
12 rows in set (0.00 sec)
mysql> create database test1-mohit;
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 '-mohi
t' at line 1