feat: drop if exists (#2859)

* feat: drop if exists

Signed-off-by: tison <wander4096@gmail.com>

* sqlness cases

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
tison
2023-12-05 10:18:33 +08:00
committed by GitHub
parent 96e12e9ee5
commit 7d506b3c5f
13 changed files with 126 additions and 41 deletions

View File

@@ -0,0 +1,22 @@
DROP TABLE IF EXISTS foo;
Affected Rows: 0
create table foo (
host string,
ts timestamp DEFAULT '2023-04-29 00:00:00+00:00',
cpu double default 0,
TIME INDEX (ts),
PRIMARY KEY(host)
) engine=mito with(regions=1);
Affected Rows: 0
DROP TABLE IF EXISTS foo;
Affected Rows: 0
DROP TABLE IF EXISTS foo;
Affected Rows: 0

View File

@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS foo;
create table foo (
host string,
ts timestamp DEFAULT '2023-04-29 00:00:00+00:00',
cpu double default 0,
TIME INDEX (ts),
PRIMARY KEY(host)
) engine=mito with(regions=1);
DROP TABLE IF EXISTS foo;
DROP TABLE IF EXISTS foo;