Files
greptimedb/tests/cases/standalone/common/alter/rename_table.sql
dennis zhuang db89235474 feat: only allow timestamp type as time index (#2281)
* 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
2023-09-12 07:57:15 -05:00

29 lines
446 B
SQL

CREATE TABLE t(i INTEGER, j TIMESTAMP TIME INDEX);
DESC TABLE t;
INSERT INTO TABLE t VALUES (1, 1), (3, 3), (NULL, 4);
SELECT * from t;
ALTER TABLE t RENAME new_table;
DESC TABLE t;
SELECT * FROM t;
CREATE TABLE t(i INTEGER, j TIMESTAMP TIME INDEX);
DESC TABLE new_table;
-- SQLNESS ARG restart=true
SELECT * FROM new_table;
ALTER TABLE new_table RENAME new_table;
ALTER TABLE new_table RENAME t;
DROP TABLE t;
DROP TABLE new_table;