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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 17:50:16  来源:igfitidea点击:

Maximum length of a Column name in MySQL

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

类似的问题已经在这里回答了
无论如何,根据文档,列名的最大允许长度为 64:Mysql 文档

回答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 Klaus Byskov Pedersen

According to this, the max length is 64

根据,最大长度为64个

回答by Dave Hogan

回答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 个字符。

回答by Fabio

it is 64 in MySQL 5.0, you can check documentation about here

它在 MySQL 5.0 中为 64,您可以查看有关此处的文档