Skip to main content
Version: 0.7

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 names
  • Type: the column data types
  • Key: PRI means the column is in the primary key constraint.
  • Null: YES means nullable, otherwise NO
  • Default: default value or expression of the column
  • Semantic Type: This column represents the semantic type, corresponding to TAG, FIELD or TIMESTAMP in the data model.