mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 21:32:58 +00:00
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:
22
tests/cases/standalone/common/drop/drop_table.result
Normal file
22
tests/cases/standalone/common/drop/drop_table.result
Normal 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
|
||||
|
||||
13
tests/cases/standalone/common/drop/drop_table.sql
Normal file
13
tests/cases/standalone/common/drop/drop_table.sql
Normal 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;
|
||||
Reference in New Issue
Block a user