Tools - MySQL Database Servers - Table Field Properties

You can open the window only from the MySQL Table Properties window. It is used to create new table fields and edit the properties of existing fields. It is made up of three groups of settings: Field name, Stored data type, Other properties.

Field name

In this group there is only the field with the name of the current field. To change the name of the field, type it here, then confirm with OK.

Place

In this group there are several options for specifying where in the table structure a new field should be placed. It can be placed at the beginning of the table, at the end of the table, or after a specific field (to be selected from the list).

The group is available only when creating a new field. When editing an existing field, it is invisible.

Stored Data Type

The "Stored Data Type" group contains several items for editing the properties of the current field. Not all of them are visible at once - it depends on the type of the field, for example, the BINARY option is only available for fields of type CHAR and VARCHAR.

Type
Select the type of stored data from the list. The list contains all data types that can be given to a MySQL database table field.

Size
Allows you to enter the size of the field. This option is available for types that require this information, such as INTEGER, VARCHAR, etc. If you select Use default size, the field will be disabled, while the default value will be used.

Precision
Specify the precision (number of decimal places) for fields of type DOUBLE, FLOAT, DECIMAL. If you check Use default size, this field will be inactive, while the default value will be used.

ZEROFILL
If you check this option, if you enter a value with a length shorter than that specified in the "Size" field into the field, the remaining space will be filled with zeros.

UNSIGNED
By checking this box, only non-negative numbers will be allowed to be stored in the number type field. This will allow positive numbers with a higher value to be stored in it.

BINARY
Checking this box will cause the values of this field to be compared by ASCII codes when sorting data from text type fields.

Values
A list of values that can be used for fields of type SET and ENUM. You can add and remove values using the buttons next to them.

By default
In this field you can enter a default value for the field.

Other properties

The group of other properties contains two options:

NOT NULL
Check this option if its filling in each record will be required (it cannot be empty). If you do not specify a value when adding a new record, the default value will be used.

AUTO INCREMENT
Check this option to have the next number automatically inserted into the field when new records are entered. A field with AUTO INCREMENT checked must belong to the primary key (PRIMARY KEY) of the table.

Related topics

To top