After a table is created, you can execute the SHOW CREATE TABLE statement to query the creation statement that defines 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 (0.01 sec)
where
DEFAULT CHARSET = utf8mb4indicates that the default character setutf8mb4is used.ROW_FORMAT = DYNAMICindicates that this table is a dynamic table. 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 ofrow_formatisdynamic. For static tables, the value ofrow_formatisfixed.COMPRESSIONindicates the compression method.PCTFREEindicates the space reserved for updating the block.