mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
* feat: only allow timestamp data type as time index * test: update sqltest cases, todo: need some fixes * fix: sqlness tests * fix: forgot adding back cte test * chore: style
23 lines
730 B
SQL
23 lines
730 B
SQL
CREATE TABLE test1 (i INTEGER, j TIMESTAMP TIME INDEX, k STRING DEFAULT 'blabla');
|
|
|
|
INSERT INTO test1 VALUES (DEFAULT);
|
|
|
|
INSERT INTO test1 VALUES (DEFAULT, DEFAULT, DEFAULT);
|
|
|
|
INSERT INTO test1 VALUES (DEFAULT, DEFAULT, DEFAULT, DEFAULT);
|
|
|
|
INSERT INTO test1 VALUES (DEFAULT, 1, DEFAULT), (default, 2, default), (DeFaUlT, 3, DeFaUlT), (dEfAuLt, 4, dEfAuLt);
|
|
|
|
SELECT * FROM test1;
|
|
|
|
CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP, k STRING DEFAULT 'blabla');
|
|
|
|
INSERT INTO test2 VALUES (1,1,'a'), (default, 2, default), (3,3,'b'), (default, 4, default), (5, 5, 'c');
|
|
|
|
INSERT INTO test2 VALUES (6, 6, default), (7, 7, 'd'), (default, 8, 'e');
|
|
|
|
SELECT * FROM test2;
|
|
|
|
DROP TABLE test1;
|
|
DROP TABLE test2;
|