Mysql Create Database with special characters in the name

前端 未结 3 667
猫巷女王i
猫巷女王i 2020-12-28 17:06

I want to create a database which name will have special characters in it. for example, (., - , _, @, #, $, %, &, *)

can anyone provide any output on this?

3条回答
  •  暖寄归人
    2020-12-28 17:32

    I would strongly recommend that you do not create databases with such names. But if you absolutely must, here are the restrictions:

    • No identifier can contain ASCII NUL (0x00) or a byte with a value of 255.
    • Database, table, and column names should not end with space characters.
    • Database and table names cannot contain “/”, “\”, “.”, or characters that are not allowed in file names.

    To create a database, you can do the following:

    mysql> create database `really@strange*database$name`;
    

提交回复
热议问题