mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 05:42:57 +00:00
* feat: support desc [table] Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * refine style Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
59 lines
2.5 KiB
Plaintext
59 lines
2.5 KiB
Plaintext
create table host_load1(
|
|
ts timestamp time index,
|
|
collector string,
|
|
host string,
|
|
val double,
|
|
primary key (collector, host)
|
|
);
|
|
|
|
Affected Rows: 0
|
|
|
|
describe table host_load1;
|
|
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| Field | Type | Null | Default | Semantic Type |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| ts | TimestampMillisecond | NO | | TIME INDEX |
|
|
| collector | String | YES | | PRIMARY KEY |
|
|
| host | String | YES | | PRIMARY KEY |
|
|
| val | Float64 | YES | | FIELD |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
|
|
describe host_load1;
|
|
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| Field | Type | Null | Default | Semantic Type |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| ts | TimestampMillisecond | NO | | TIME INDEX |
|
|
| collector | String | YES | | PRIMARY KEY |
|
|
| host | String | YES | | PRIMARY KEY |
|
|
| val | Float64 | YES | | FIELD |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
|
|
desc table host_load1;
|
|
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| Field | Type | Null | Default | Semantic Type |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| ts | TimestampMillisecond | NO | | TIME INDEX |
|
|
| collector | String | YES | | PRIMARY KEY |
|
|
| host | String | YES | | PRIMARY KEY |
|
|
| val | Float64 | YES | | FIELD |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
|
|
desc host_load1;
|
|
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| Field | Type | Null | Default | Semantic Type |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
| ts | TimestampMillisecond | NO | | TIME INDEX |
|
|
| collector | String | YES | | PRIMARY KEY |
|
|
| host | String | YES | | PRIMARY KEY |
|
|
| val | Float64 | YES | | FIELD |
|
|
+-----------+----------------------+------+---------+---------------+
|
|
|
|
drop table host_load1;
|
|
|
|
Affected Rows: 1
|
|
|