Reputation: 7465
is there a limitation of database name can't be created as numeric?
mysql> CREATE DATABASE 1;
...results in:
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 '1' at line 1
....or am I doing something wrong?
Upvotes: 2
Views: 515
Reputation: 46796
There's the backticks option whatever name
, but it's a very bad practice to use non-standard names, and even worse practice to use databases as a kind of record. Think of migrating, various automated tools, gui editors...
Upvotes: 0
Reputation: 78105
You can create databases with purely numeric names - you need to quote though:
CREATE DATABASE `1`;
Limitations on names are in the MySQL documentation.
Upvotes: 4