mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-26 18:00:41 +00:00
* temp commit * feat: impl Display for CreateTable statement * feat: impl show create table for standalone * fix: forgot show.rs * feat: clean code * fix: typo * feat: impl show create table for distributed * test: add show create table sqlness test * fix: typo * fix: sqlness tests * feat: render partition rules for distributed table * Update src/sql/src/statements.rs Co-authored-by: Yingwen <realevenyag@gmail.com> * Update src/sql/src/statements.rs Co-authored-by: Yingwen <realevenyag@gmail.com> * Update src/sql/src/statements.rs Co-authored-by: Yingwen <realevenyag@gmail.com> * Update src/sql/src/statements/create.rs Co-authored-by: Yingwen <realevenyag@gmail.com> * chore: by CR comments * fix: compile error * fix: missing column comments and extra table options * test: add show create table test * test: add show create table test * chore: timestamp precision * fix: test --------- Co-authored-by: Yingwen <realevenyag@gmail.com>
26 lines
650 B
Plaintext
26 lines
650 B
Plaintext
CREATE TABLE timestamp_with_precision (ts TIMESTAMP(6) TIME INDEX, cnt INT);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO timestamp_with_precision(ts,cnt) VALUES ('2023-04-04 08:00:00.0052+0000', 1);
|
|
|
|
Affected Rows: 1
|
|
|
|
INSERT INTO timestamp_with_precision(ts,cnt) VALUES ('2023-04-04 08:00:00.0052+0800', 2);
|
|
|
|
Affected Rows: 1
|
|
|
|
SELECT * FROM timestamp_with_precision ORDER BY ts ASC;
|
|
|
|
+----------------------------+-----+
|
|
| ts | cnt |
|
|
+----------------------------+-----+
|
|
| 2023-04-04T00:00:00.005200 | 2 |
|
|
| 2023-04-04T08:00:00.005200 | 1 |
|
|
+----------------------------+-----+
|
|
|
|
DROP TABLE timestamp_with_precision;
|
|
|
|
Affected Rows: 1
|
|
|