Hi All
I want to create a database which name will have special characters in it. for example, (., - , _, @, #, $, %, &, *)
can anyone provide any output on this?
Hi All
I want to create a database which name will have special characters in it. for example, (., - , _, @, #, $, %, &, *)
can anyone provide any output on this?
I would strongly recommend that you do not create databases with such names. But if you absolutely must, here are the restrictions:
To create a database, you can do the following:
mysql> create database `really@strange*database$name`;
Simple: Don't.
You can escape exotic table names using the backtick in mysql, but I don't know if you can use anything inside the backticks. It will give great amounts of pain during the rest of your software life cycle.
I would rather recommend creating another table to hold that exotic names.
-- Example:
CREATE TABLE _DatabaseMetadata (
databaseName VARCHAR(255),
exoticName VARCHAR(255)
) DEFAULT CHARSET=utf8;