您不能使用如下所示的数字名称创建数据库-

mysql> create database 1233;

这将产生以下输出-

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

要使用数字名称创建数据库,您需要在数据库名称周围使用反引号-

create database yourDatabaseName;

让我们实现以上语法-

mysql> create database `1233`;

现在您可以切换到相同的数据库-

mysql> use `1233`;
Database changed

相关文章:

  • 2021-05-10
  • 2021-08-01
  • 2021-06-06
  • 2022-12-23
  • 2021-06-10
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-01-19
相关资源
相似解决方案