mysql - 在 Mariadb 中创建数据库时出现惊人的 SQL 错误 1024

标签 mysql mariadb

当执行如果不存在则创建数据库7e7;

得到错误:

" SQL Error [1064] [42000]: (conn:67) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '7e7' at line 1 Query is : create database if not exists 7e7 "

但执行create database if not exists 7b7 ;,就可以了。

为什么?

docker container, mariadb:10.2

version 10.2.19-MariaDB-1:10.2.19+maria~bionic

最佳答案

7e7 看起来太像科学记数法中的数字 70,000,000。

如有疑问,请用反引号包围数据库、表和列名称:

`7e7`

关于mysql - 在 Mariadb 中创建数据库时出现惊人的 SQL 错误 1024,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53422841/

相关文章:

MySQL基于INT列最后一位的索引

java - 无法使用 Java 和 Mariadb 连接到远程数据库

mysql - 具有额外功能的 MySQL 分组

MYSQL - 不同数据库中的两个表

php - Zend 从 uri 获取模型 id

python - Importerror : libmariadbclient. so.18:无法打开共享对象文件:没有这样的文件或目录

MySQL 使用 MIN() 函数得到错误结果

mysql - MariaDB/MYSql 非描述性语法错误,更新重复键

php - MySQL 返回空结果集

php - 从 UI 将 API key 存储在数据库中