Http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
The following table describes the maximum length for each type of identifier.
Identifier |
Maximum Length (characters) |
Database |
( NDB storage engine:63) |
Table |
( NDB storage engine:63) |
Column |
64 |
Index |
64 |
Constraint |
64 |
Stored Program |
64 |
View |
64 |
Tablespace |
64 |
Server |
64 |
Log File Group |
64 |
Alias |
(See exception following table) |
Compound Statement Label |
16 |
user-defined Variable |
As of MySQL 5.7.5, no limit before that |
Aliases for column names in CREATE VIEW
statements is checked against the maximum column length of characters (not the maxim Um alias length of characters).
Identifiers is stored using Unicode (UTF-8). This applies to identifiers in table definitions that is stored in .frm
files and to identifiers stored in the Grant tab Les in the mysql
database. The sizes of the identifier string columns in the grant tables is measured in characters. You can use multibyte characters without reducing the number of characters permitted for values stored in these columns. As indicated earlier, the permissible Unicode characters is those in the Basic multilingual Plane (BMP). Supplementary characters is not permitted.
MySQL Cluster imposes a maximum length of characters for names of databases and tables. See sections 19.1.6.5, "Limits associated with Database Objects in MySQL Cluster".
Maximum length of a table name in MySQL