Special Characters in MySQL Table Name

后端 未结 7 1789
一向
一向 2020-11-29 11:05

I created a table as follows:

CREATE TABLE IF NOT EXISTS \'e!\' (
`aa` int(11) unsigned NOT NULL auto_increment,
`showName` TEXT NOT NULL default \'\',
`star         


        
7条回答
  •  盖世英雄少女心
    2020-11-29 11:49

    Permitted characters in unquoted identifiers:

    ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)

    Extended: U+0080 .. U+FFFF

    Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000:

    ASCII: U+0001 .. U+007F

    Extended: U+0080 .. U+FFFF

    ASCII NUL (U+0000) and supplementary characters (U+10000 and higher) are not permitted in quoted or unquoted identifiers.

    Identifiers may begin with a digit but unless quoted may not consist solely of digits.

    Database, table, and column names cannot end with space characters.

    Source: https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

提交回复
热议问题