In MySQL Workbench table editor there are 7 column flags available: PK, NN, UQ, BIN, UN, ZF, AI.

PK obviously stands for Primary Key. What about others?

推荐答案

PK - Primary Key

NN - Not Null

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.)

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)

UQ - Create/remove Unique Key

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. )

AI - Auto Increment

G - Generated column. i.e. value generated by a formula based on the other columns

Mysql相关问答推荐

是否有一种方法可以 Select 表中具有特定列值的行,该行还显示phpmyadmin中原始表中的行号?

AWS RDS上的MySQL复制错误:超级权限或REPLICATION_SLAVE_ADMIN权限的访问被拒绝

SQL中的搜索模式

在MySQL和JavaFX中保存和检索图像文件

含有子查询的MySQL函数出现语法错误

如何创建一个列,该列在另一个表中具有值的计数?

实体内约束的唯一增量 ID 生成

mysql 执行注释部分

是否可以在一个查询中将字符串附加到许多匹配的行

我在查询中没有得到正确的结果

sql sum - 处理连接表中的脏重复项

用序列号mysql更新列

将 MySQL 查询的输出转换为 utf8

MySQL:在 Select 语句中自动增加临时列

计算执行的查询数

mysqli_fetch_array() 期望参数 1 为 mysqli_result,布尔值

Ubuntu 中的 MySQL JDBC jar 文件在哪里?

从 MySQL 中的日、月、年字段创建日期

获取最后一组不同的记录

来自 MySQL 中多个表的 COUNT(*)