After successfully creating a table, you can use the SHOW CREATE TABLE statement to query the definition of the table.
Here is an example.
obclient> SHOW CREATE TABLE test;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test | CREATE TABLE `test` (
`id` int(11) DEFAULT NULL,
`name` char(1) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set
In this example, the following fields are used:
DEFAULT CHARSET = utf8mb4indicates that the default character set isutf8mb4.ROW_FORMAT = DYNAMICindicates that this table is a dynamic table.COMPRESSIONindicates the compression method.PCTFREEindicates the space reserved for updating data in the block.
Note
A table that contains varchar values, text and its variations, or blob and its variations is considered a dynamic table. For dynamic tables, the value of
ROW_FORMATisDYNAMIC. For static tables, the value ofROW_FORMATisFIXED.