When I create a table, I add the rows in table, but don't know the BIN
, UN
, ZF
, and G
means.
I know the PK
is primary key, the NN
is not null, the AI
is auto increment, but how about the others here?
ZF is for Zero Filled. Suppose, we have declared int(3) and you want to store 21, then zero filled would output the result 021.
Having looked through some of the Workbench code and the MySQL documentation, it looks like the G column is for Generated Columns. In the source code, there's the following within the mysql_table_editor_column_page file (line 132 at the time of writing): model->model().
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.
b is alias name for subquery. Then in your outer query you can refer to columns like: SELECT b.pass FROM (SELECT pass FROM table_name WHERE ssid=?) AS b.
Those means:
BIN
: binary (if dt is a blob or similar, this indicates that is binary data, rather than text)
UN
: unsigned (for integer types)
ZF
: zero fill (rather a display related flag)
G
: generated column
You can also get that info from the tooltip that shows up on mouse hover over the header:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With