Files
greptimedb/tests/cases/standalone/common/show/show_columns.sql
dennis zhuang 4a5bb698a9 feat: impl show index and show columns (#3577)
* feat: impl show index and show columns

* fix: show index from database

* fix: canonicalize table name

* refactor: show parsers
2024-03-29 18:34:52 +00:00

25 lines
512 B
SQL

CREATE TABLE IF NOT EXISTS system_metrics (
host STRING,
idc STRING,
cpu_util DOUBLE,
memory_util DOUBLE,
disk_util DOUBLE,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(host, idc),
TIME INDEX(ts)
);
SHOW COLUMNS;
SHOW COLUMNS FROM system_metrics;
SHOW COLUMNS FROM system_metrics in public;
SHOW FULL COLUMNS FROM `system_metrics`;
SHOW COLUMNS FROM system_metrics like '%util%';
SHOW COLUMNS FROM system_metrics WHERE Field = 'cpu_util';
DROP TABLE system_metrics;