Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What mean of the `BIN`, `UN`, `ZF`, and `G` means in MySQL WorkBench?

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?

enter image description here

like image 390
user7693832 Avatar asked Apr 13 '17 14:04

user7693832


People also ask

What does ZF mean in MySQL?

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.

What is G in MySQL Workbench?

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

What is PK and NN in MySQL?

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.

What does B mean in SQL query?

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.


1 Answers

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:

enter image description here

like image 50
aircraft Avatar answered Jan 04 '23 00:01

aircraft