mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 13:22:57 +00:00
feat: support table level comment (#4042)
* feat: support table level comment * use constants Signed-off-by: tison <wander4096@gmail.com> --------- Signed-off-by: tison <wander4096@gmail.com> Co-authored-by: tison <wander4096@gmail.com>
This commit is contained in:
@@ -204,3 +204,36 @@ DROP table `ExcePTuRi`;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
CREATE TABLE if not exists monitor (
|
||||
host STRING,
|
||||
ts TIMESTAMP(9) DEFAULT CURRENT_TIMESTAMP() TIME INDEX,
|
||||
cpu FLOAT64 DEFAULT 0,
|
||||
memory FLOAT64,
|
||||
PRIMARY KEY(host)) ENGINE=mito WITH(COMMENT='create by human');
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
SHOW CREATE TABLE monitor;
|
||||
|
||||
+---------+-----------------------------------------------------------+
|
||||
| Table | Create Table |
|
||||
+---------+-----------------------------------------------------------+
|
||||
| monitor | CREATE TABLE IF NOT EXISTS "monitor" ( |
|
||||
| | "host" STRING NULL, |
|
||||
| | "ts" TIMESTAMP(9) NOT NULL DEFAULT current_timestamp(), |
|
||||
| | "cpu" DOUBLE NULL DEFAULT 0, |
|
||||
| | "memory" DOUBLE NULL, |
|
||||
| | TIME INDEX ("ts"), |
|
||||
| | PRIMARY KEY ("host") |
|
||||
| | ) |
|
||||
| | |
|
||||
| | ENGINE=mito |
|
||||
| | WITH( |
|
||||
| | comment = 'create by human' |
|
||||
| | ) |
|
||||
+---------+-----------------------------------------------------------+
|
||||
|
||||
DROP TABLE monitor;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
|
||||
@@ -81,3 +81,14 @@ DROP TABLE test_like_1;
|
||||
DROP TABLE test_like_2;
|
||||
|
||||
DROP table `ExcePTuRi`;
|
||||
|
||||
CREATE TABLE if not exists monitor (
|
||||
host STRING,
|
||||
ts TIMESTAMP(9) DEFAULT CURRENT_TIMESTAMP() TIME INDEX,
|
||||
cpu FLOAT64 DEFAULT 0,
|
||||
memory FLOAT64,
|
||||
PRIMARY KEY(host)) ENGINE=mito WITH(COMMENT='create by human');
|
||||
|
||||
SHOW CREATE TABLE monitor;
|
||||
|
||||
DROP TABLE monitor;
|
||||
|
||||
Reference in New Issue
Block a user