DESCRIBE TABLE
DESCRIBE [TABLE] [db.]table describes the table structure in the db or the current database in-use.
Examples
Describes the table monitor:
DESCRIBE TABLE monitor;
or
DESCRIBE monitor;
Output:
+--------+----------------------+------+------+---------------------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+------+------+---------------------+---------------+
| host | String | PRI | YES | | TAG |
| ts | TimestampMillisecond | PRI | NO | current_timestamp() | TIMESTAMP |
| cpu | Float64 | | YES | 0 | FIELD |
| memory | Float64 | | YES | | FIELD |
+--------+----------------------+------+------+---------------------+---------------+
4 rows in set (0.00 sec)
It produces the table structure:
Column: the column namesType: the column data typesKey:PRImeans the column is in the primary key constraint.Null:YESmeans nullable, otherwiseNODefault: default value or expression of the columnSemantic Type: This column represents the semantic type, corresponding toTAG,FIELDorTIMESTAMPin the data model.