MySQL Workbench 中的列标志是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3663952/
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
What do column flags mean in MySQL Workbench?
提问by Ivan
In MySQL Workbench table editor there are 7 column flags available: PK, NN, UQ, BIN, UN, ZF, AI.
在 MySQL Workbench 表编辑器中,有 7 个可用的列标志:PK、NN、UQ、BIN、UN、ZF、AI。
PK obviously stands for Primary Key. What about others?
PK 显然代表主键。其他人呢?
回答by Vasiliy Kulakov
PK - Primary Key
PK - 主键
NN - Not Null
NN - 非空
BIN - Binary (stores data as binary strings. There is no character set so sorting and comparison is based on the numeric values of the bytes in the values.)
BIN - 二进制(将数据存储为二进制字符串。没有字符集,因此排序和比较基于值中字节的数值。)
UN - Unsigned (non-negative numbers only. so if the range is -500 to 500, instead its 0 - 1000, the range is the same but it starts at 0)
UN - 无符号(仅限非负数。因此,如果范围是 -500 到 500,而不是 0 - 1000,则范围相同但从 0 开始)
UQ - Create/remove Unique Key
UQ - 创建/删除唯一键
ZF - Zero-Filled (if the length is 5 like INT(5) then every field is filled with 0's to the 5th digit. 12 = 00012, 400 = 00400, etc. )
ZF - 零填充(如果像 INT(5) 这样的长度是 5,那么每个字段都用 0 填充到第 5 位。12 = 00012、400 = 00400 等)
AI - Auto Increment
AI - 自动增量
G - Generated column. i.e. value generated by a formula based on the other columns
G - 生成的列。即基于其他列的公式生成的值
回答by macio.Jun
Here is the source of these column flags
这是这些列标志的来源
http://dev.mysql.com/doc/workbench/en/wb-table-editor-columns-tab.html
http://dev.mysql.com/doc/workbench/en/wb-table-editor-columns-tab.html
回答by cellepo
This exact question is answered on mySql workbench-faq:
在mySql workbench-faq上回答了这个确切的问题:
Hover over an acronym to view a description, and see the Section 8.1.11.2, “The Columns Tab” and MySQL CREATE TABLE documentation for additional details.
将鼠标悬停在首字母缩略词上可查看说明,有关其他详细信息,请参阅第 8.1.11.2 节“列选项卡”和 MySQL CREATE TABLE 文档。
That means hover over an acronym in the mySql Workbench table editor.
这意味着将鼠标悬停在 mySql Workbench 表编辑器中的首字母缩略词上。