Help Tables, columns and indexes

Table options

Table options are the settings that belong to the table as a whole rather than to one column. In the table designer, the most used ones (engine, character set and collation) sit at the top, above the tabs; the rest are on the 5 Advanced tab.

To open the designer, see Creating a table (F4) or Changing a table (F6).

The table designer, Advanced tab

At the top of the designer

FieldWhat it does
EngineThe storage engine, from the list the server reports. For a new table, [default] leaves it to the server. Foreign keys need an engine that supports them, such as InnoDB. For an existing table with another engine, bonSQL will not open the Foreign Keys tab; for a new table, the foreign keys are left out of the statement. See Foreign keys.
Character SetThe table’s default character set. Columns can still set their own on the Columns tab.
CollationThe table’s default collation. The list shows the collations of the chosen character set.

On Save, a value is only written if it differs from what the table already has: ENGINE=, charset= and collate=.

The Advanced tab

FieldWhat it does
CommentA comment stored with the table. Up to 2048 characters on MySQL 5.5.3 and MariaDB 5.5 and later, 60 on older servers.
Auto incrementThe next value the auto-increment column will hand out (auto_increment=). For an existing table it shows the current value.
Avg. row lengthavg_row_length=, a sizing hint for the server.
Maximum rowsmax_rows=, a sizing hint for the server.
Minimum rowsmin_rows=, a sizing hint for the server.
Row formatrow_format=: dynamic, fixed, compressed, compact or redundant. Which ones the server accepts depends on the engine.
Checksumchecksum= 1 or 0.
Delay key writedelay_key_write= 1 or 0.
System versioningMariaDB 10.3.4 and later only. 1 makes the table system-versioned (WITH SYSTEM VERSIONING), so the server keeps the history of every row.

The number fields accept digits only. For a new table, the Row format, Checksum and Delay key write lists start on [default], which means bonSQL writes nothing for that option, so the server’s own default applies. For an existing table they show the table’s current value, and there is no [default] entry.

What is sent

For a new table, the options you set are added after the closing bracket of CREATE TABLE.

For an existing table, only options you changed are sent, as part of the designer’s ALTER TABLE. Changing System versioning to 1 sends ADD SYSTEM VERSIONING; changing it to 0 sends DROP SYSTEM VERSIONING. bonSQL reads whether a table is versioned from the server’s information_schema.TABLES.

Check the SQL Preview tab to see exactly what will be sent; see SQL preview.

Other ways to see or change options

Tips