如何删除以“`”开头的数据库,因为添加单个backstick无法解决[重复]

问题描述 投票:0回答:1

如何删除带有反引号的 NAMMIK mysql(innodb_version 10.4.18)?它是 CALL 无意添加的

sys.create_synonym_db;
请注意,添加单个后杆并不能解决问题,因为在这种情况下,后杆位于开头。

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| `NAMMIK`           |
| NAMMIK             |
| mysql              |
| nammik             |
| performance_schema |
| sys                |
+--------------------+

 mysql> DROP DATABSE `NAMMIK`;
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 'DATABSE `NAMMIK`' at line 1
mysql database
1个回答
2
投票

尝试:

DROP DATABASE ```NAMMIK```;
© www.soinside.com 2019 - 2024. All rights reserved.