Online Documentation for SQL Manager for MySQL
Setting field options
Enter a name for the new field, or modify the name of the field being edited. Note that the name of a field must be unique among all the field names in the table.
Set the custom comment for the field.
The Type drop-down list defines the type of the field data.
Use the Size spinner control to define the length of the field value (for integer, float and char data types). Check the Use size option to enable this control.
Use the Scale spinner control to define the precision of the field value (for float data types). The scale indicates the number of significant digits. Check the Use size option to enable this control.
Select the Character set and Collation for character data types.
Note: MySQL supports the use of character sets for the MyISAM, MEMORY, NDBCluster and InnoDB storage engines.
The column character set and collation are treated by the server in the following way:
- If both Character Set X and Collation Y are specified, then character set X and collation Y will be applied
- If Character Set X is specified without Collation, then character set X and its default collation will be applied
- Otherwise, the table character set and collation are used (see Table properties)
Select the appropriate value in the Generated Type combo to setup a generated column. VIRTUAL - column values are not stored, but are evaluated when rows are read, immediately after any BEFORE triggers. A virtual column takes no storage; STORED - column values are evaluated and stored when rows are inserted or updated. A stored column does require storage space and can be indexed. NONE - column values are not generated.
Values of a generated column are computed from an expression that is set in the Expression field.
Select this option to specify that the values for the column should never contain a null value.
Check this option to set the size properties for field types having dimension properties (e.g. integer, float, or timestamp data types). This option activates the Size and Scale options.
Check this option to include the field into the primary key. Note that if you include a field to a primary key, you should also make it Not Null.
A table typically has a column or combination of columns that contain values that uniquely identify each row in the table. This column, or columns, is called the primary key (PK) of the table and enforces integrity of the table.
Note: With this option checked, this field becomes the only field within a primary key. If you check this field, you will not be able to set this attribute for any other field in the table. Hence if you want to create a compound primary key, do not check this field, but create a primary key using the Indexes tab of Table Editor.
Includes the field into the unique key (index).
Assigns the UNSIGNED attribute to the field: integer data will be displayed unsigned.
Assigns the ZEROFILL attribute to the field: for columns of the numeric data type, MySQL will automatically add zeros before the first significant digit of the number stored in this column.
Assigns the AUTO_INCREMENT attribute to the field: values of the unique identifier will be automatically generated for new rows.
When creating/editing a field of the ENUM or SET data type, you need to specify the list of values implied by these data types. The Values box allows you to define a set of necessary values. Click the ellipsis button at the right to create/edit the list of field values using the Values List dialog.
Use the Default value field to set the default value for the current field.
When adding a new field, you can also specify the preferable Insert mode which defines the position of the field among other table fields:
Insert after field (use the Insert after drop-down list to select the field after which the new field should be inserted).