Table Columns
Use the Columns view to see and change a table's column definitions.

Column Notes #
- Columns can be rearranged and renamed.
- For a decimal column's length, separate precision and scale with a comma. Ex:
3, 6 - In the Flags column of numeric types,
uis unsigned andzis zerofill. - For a NULL default, set Allow Null to YES, and type
NULLin the Default column. - The Extra column holds miscellaneous SQL, such as
ON UPDATE CURRENT_TIMESTAMP.
Filtering and Sorting #
Type in the filter field below the list to show only the columns whose names match. Columns you add while a filter is active stay visible so they don't vanish as you name them.
The Sort By menu chooses the order of the list:
| Choice | Order |
|---|---|
| Table Order | The order the columns have in the table. |
| By Name | Alphabetical by column name. |
Filtering and sorting only change what you see. They don't change the table.
Reordering Columns #
MySQL lets you change the order of a table's columns. Drag a column up or down in the list to move it.
Dragging is only available when Sort By is Table Order and the filter field is empty. Otherwise the list doesn't show the table's real column order, so there is no meaningful place to drop a column.
To move a column
-
Set Sort By to Table Order, and clear the filter field.
-
Drag the column to its new position.
-
Click Apply.
Adding a Column #
Press Command-+ to add a new column.
Default Values #
There are three ways to set a column's default in the Default column:
| To use | Do this |
|---|---|
| A literal value | Type it into the Default column, such as 0, pending, NULL, or CURRENT_TIMESTAMP. |
| No default | Choose No Default from the menu. |
| Any SQL expression | Choose Set as SQL Expression… from the menu, then type the expression. |
A default that is an SQL expression is marked with an SQL pill. To go back to a plain value, choose Set as followed by the column's type from the same menu.
To set a column's default
-
Click the Default cell for the column.
-
Type a value, or choose No Default or Set as SQL Expression… from the menu.
-
Click Apply to save the change.
Generated Columns #
A generated column's value is calculated from an expression. On servers that support them, the Generated column has a menu with these choices:
| Choice | Meaning |
|---|---|
| NO | A normal column. |
| VIRTUAL | Calculated when read. On PostgreSQL, requires version 18 or later. |
| STORED | Calculated when the row is written, and saved. |
| IDENTITY | PostgreSQL only. An auto-numbering column backed by a sequence. Its ALWAYS or BY DEFAULT setting and sequence options are in the details below the list. |
To make a column generated
-
Select the column.
-
In the Generated column, choose VIRTUAL or STORED.
-
With the column still selected, type the expression in the details view below the columns list.
-
Click Apply.
Choosing VIRTUAL or STORED clears the column's default. Choosing NO turns a generated column back into a normal one and removes its expression.
Set and Enum Value Lists #
For setting the list of values allowed in an Enum or Set column, there is a dedicated "value list" editor.

To Add a New Value
-
Click on "New Value…" and type a new value to add.
-
Press Return
-
Note that you can immediately begin typing the next value.
Editing Values
-
To edit a value, double-click on it, or click on it and press Return.
-
Select values and press Delete to remove them.
-
You can drag and reorder values.
Selecting Values
-
Select multiple values using Command-Click or Shift-Click.
-
Select all values with Command-A to remove them.
-
You can drag and reorder values.