MySQL建表時,基本字段的含義

[intrinsic column flags] (基本字段類型標識)this

  • PK: primary key (column is part of a pk) 主鍵rem

  • NN: not null (column is nullable) 非空it

  • UQ: unique (column is part of a unique key) 惟一io

  • AI: auto increment (the column is auto incremented when rows are inserted) 自增擴展

[additional data type flags, depend on used data type] 擴展數據類型標記sed

  • BIN: Is binary column (if data is a blob or similar, this indicates that is binary data, rather than text) 存放二進制數據的列數據類型

  • UN: unsigned (for integer types, see docs: 「10.2. Numeric Types」) 無符號整數二進制

  • ZF: Fill up values for that column with 0's if it is numeric (rather a display related flag, see docs: 「10.2. Numeric Types」)填充0位(例如指定3位小數,整數18就會變成18.000)im

相關文章
相關標籤/搜索