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
:PRI
means the column is in the primary key constraint.Null
:YES
means nullable, otherwiseNO
Default
: default value or expression of the columnSemantic Type
: This column represents the semantic type, corresponding toTAG
,FIELD
orTIMESTAMP
in the data model.
当前内容版权归 GreptimeDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 GreptimeDB .