2023-10-12 17:08:21 +08:00
|
|
|
INSERT INTO db.tb ;
|
|
|
|
|
|
|
|
SELECT * FROM db.;
|
|
|
|
|
|
|
|
CREATE TABLE db. VALUES;
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS db.a;
|
|
|
|
|
|
|
|
CREATE OR REPLACE VIEW db.v;
|
|
|
|
|
|
|
|
DROP VIEW db.v ;
|
|
|
|
|
|
|
|
CREATE FUNCTION fn1;
|
|
|
|
|
|
|
|
SELECT name, calculate_age(birthday) AS age FROM students;
|
|
|
|
|
|
|
|
CREATE DATABASE db;
|
|
|
|
|
|
|
|
DROP SCHEMA IF EXISTS sch;
|
2023-11-28 21:18:44 +08:00
|
|
|
|
|
|
|
ANALYZE TABLE students COMPUTE STATISTICS FOR COLUMNS name, co ;
|
|
|
|
|
|
|
|
ALTER TABLE StudentInfo ADD COLUMNS (LastName string, );
|
|
|
|
|
|
|
|
ALTER TABLE StudentInfo RENAME COLUMN ;
|
|
|
|
|
|
|
|
ALTER TABLE StudentInfo RENAME COLUMN name TO t;
|
|
|
|
|
|
|
|
ALTER TABLE StudentInfo DROP COLUMNS (LastName, );
|
|
|
|
|
|
|
|
ALTER TABLE StudentInfo CHANGE FirstName;
|
|
|
|
|
|
|
|
INSERT INTO students ( );
|
|
|
|
|
|
|
|
INSERT INTO students ( id, n );
|
|
|
|
|
|
|
|
SELECT ;
|
|
|
|
|
|
|
|
SELECT id, n;
|
|
|
|
|
|
|
|
SELECT FROM tbl;
|
|
|
|
|
|
|
|
SELECT id, n FROM tbl;
|
|
|
|
|
|
|
|
SELECT id, n FROM tbl GROUP BY ;
|
|
|
|
|
|
|
|
SELECT id, n FROM tbl ORDER BY name, i ;
|
|
|
|
|
2024-02-26 17:25:19 +08:00
|
|
|
SELECT id FROM tb1 GROUP BY ROLLUP( );
|
|
|
|
|
|
|
|
CREATE MATERIALIZED VIEW db.mv;
|
|
|
|
|
|
|
|
DROP MATERIALIZED VIEW db.mv;
|
|
|
|
|
|
|
|
ALTER MATERIALIZED VIEW db.mv;
|
|
|
|
|
|
|
|
REFRESH MATERIALIZED VIEW db.mv;
|
|
|
|
|
|
|
|
SHOW CREATE MATERIALIZED VIEW db.mv;
|
|
|
|
|
|
|
|
SHOW MATERIALIZED VIEWS from db;
|
|
|
|
|
|
|
|
OPTIMIZE db.tb;
|
|
|
|
|
|
|
|
OPTIMIZE db.tb ZORDER BY ;
|
|
|
|
|
|
|
|
OPTIMIZE db.tb ZORDER BY name, i;
|