 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Can we create a database with a numeric name with MySQL?
You cannot create database with numeric name as shown below −
mysql> create database 1233;
This will produce the following output −
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
To create a database with numeric name, you need to use backticks around the database name −
create database yourDatabaseName;
Let us implement the above syntax −
mysql> create database `1233`; Query OK, 1 row affected (0.20 sec)
Now you can switch to the same database −
mysql> use `1233`; Database changed
Advertisements
 