CREATE DATABASE `mybatis-subject` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin*/
其中的 /*!40100 ...*/ 这部分注释会被MySQL执行,表示服务端版本号大于4.1.00时会被执行。
mysql>mysql> show create database mybatis-subject;1064 - 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 '-subject' at line 1mysql>mysql> show create database 'mybatis-subject';1064 - 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 ''mybatis-subject'' at line 1mysql>mysql> show create database `mybatis-subject`;+-----------------+-------------------------------------------------------------------------------------------------+
| Database | Create Database |
+-----------------+---------------------------