您不能使用如下所示的數字名稱創建數據庫-
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
