MySQL MySQL中列名的最大长度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16920001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maximum length of a Column name in MySQL
提问by user2440574
I am working with mysql and have a column name with length 70.
So, I am getting error which states that the column name is too long.
Now, I just want to know what is the maximum length of column name in mysql?
我正在使用 mysql 并且有一个长度为 70 的列名。
因此,我收到错误,指出列名太长。
现在,我只想知道 mysql 中列名的最大长度是多少?
采纳答案by Waqas Malik
Similar question is already answered Here
Anyway,
Maximum allowed length of column name is 64 according to documentation : Mysql Documentation
回答by Daanvn
The following table describes the maximum length for each type of identifier.
下表描述了每种标识符的最大长度。
Identifier Maximum Length (characters)
Database 64
Table 64
Column 64
Index 64
Constraint 64
Stored Procedure or Function 64
Trigger 64
View 64
Alias 256
Compound Statement Label 16
回答by Dave Hogan
64 Characters in MySQL 5.0
MySQL 5.0 中的 64 个字符
Ref : http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
回答by David Jashi
It's 64 characters max in current version - http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
当前版本最多 64 个字符 - http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
回答by newfurniturey
Per the documentation, the maximum length for a column name is: 64 characters.
根据文档,列名的最大长度为:64 个字符。