Description\n-----------\n\nDatabases, tables, indexes, columns, aliases, views, stored routines, triggers, events, variables, partitions, tablespaces, savepoints, labels, users, roles, are collectively known as identifiers, and have certain rules for naming.\n\nIdentifiers may be quoted using the backtick character (`  `). Quoting is optional for identifiers that don't contain special characters, or for identifiers that are not reserved words. If the ANSI_QUOTES SQL_MODE flag is set, double quotes (") can also be used to quote identifiers. If the MSSQL flag is set, square brackets ([ and ]) can be used for quoting.\n\nEven when using reserved words as names, fully qualified names do not need to be quoted. For example, test.select has only one possible meaning, so it is correctly parsed even without quotes.\n\nUnquoted\n\nThe following characters are valid, and allow identifiers to be unquoted:\n\n ASCII: \\[0-9,a-z,A-Z$_] (numerals 0-9, basic Latin letters, both lowercase and uppercase, dollar sign, underscore)\n Extended: U+0080 .. U+FFFF\n\nQuoted\n\nThe following characters are valid, but identifiers using them must be quoted:\n\n ASCII: U+0001 .. U+007F (full Unicode Basic Multilingual Plane (BMP) except for U+0000)\n Extended: U+0080 .. U+FFFF\n Identifier quotes can themselves be used as part of an identifier, as long as they are quoted.\n\nFurther Rules\n\nThere are a number of other rules for identifiers:\n\n Identifiers are stored as Unicode (UTF-8)\n Identifiers may or may not be case-sensitive. See Indentifier Case-sensitivity.\n Database, table and column names can't end with space characters\n Identifier names may begin with a numeral, but can't only contain numerals unless quoted.\n An identifier starting with a numeral, followed by an 'e', may be parsed as a floating point number, and needs to be quoted.\n Identifiers are not permitted to contain the ASCII NUL character (U+0000) and supplementary characters (U+10000 and higher).\n Names such as 5e6, 9e are not prohibited, but it's strongly recommended not to use them, as they could lead to ambiguity in certain contexts, being treated as a number or expression.\n User variables cannot be used as part of an identifier, or as an identifier in an SQL statement.\n\nQuote Character\n\nThe regular quote character is the backtick character - \\\\\\, but if the ANSI_QUOTES SQL_MODE option is specified, a regular double quote - " may be used as well.\n\nThe backtick character can be used as part of an identifier. In that case the identifier needs to be quoted. The quote character can be the backtick, but in that case, the backtick in the name must be escaped with another backtick.\n\nMaximum Length\n\n Databases, tables, columns, indexes, constraints, stored routines, triggers, events, views, tablespaces, servers and log file groups have a maximum length of 64 characters.\n Compound statement labels have a maximum length of 16 characters.\n Aliases have a maximum length of 256 characters, except for column aliases in CREATE VIEW statements, which are checked against the maximum column length of 64 characters (not the maximum alias length of 256 characters).\n Users have a maximum length of 80 characters.\n Roles have a maximum length of 128 characters.\n* Multi-byte characters do not count extra towards the character limit.\n\nMultiple Identifiers\n\nMariaDB allows the column name to be used on its own if the reference will be unambiguous, or the table name to be used with the column name, or all three of the database, table and column names. A period is used to separate the identifiers, and the period can be surrounded by spaces.\n\nExamples\n--------\n\nCREATE TABLE t1 (i int);\n\nINSERT INTO t1(i) VALUES (10);\n\nSELECT i FROM t1;\n+------+\n| i    |\n+------+\n|   10 |\n+------+\n\nSELECT t1.i FROM t1;\n+------+\n| i    |\n+------+\n|   10 |\n+------+\n\nSELECT test.t1.i FROM t1;\n+------+\n| i    |\n+------+\n|   10 |\n+------+\n\nURL: https://mariadb.com/docs/server/reference/sql-structure/sql-language-structure/identifier-names