lava-oushudb-dt-sql-parser/test/parser/hive/syntax/fixtures/createDatabase.sql
XCynthia 97ab76af76
Feat check hive create syntax (#157)
* check and update abort and alter sql

* delete superfluous space

* update grammar lib after change alter parser

* update alter parser to be compatible

* check create sql

---------

Co-authored-by: zhaoge <>
2023-09-06 16:42:04 +08:00

27 lines
1.1 KiB
SQL

CREATE DATABASE mydb;
CREATE REMOTE DATABASE mydb;
CREATE REMOTE DATABASE IF NOT EXISTS mydb;
CREATE SCHEMA myschema;
CREATE REMOTE SCHEMA myschema;
CREATE REMOTE SCHEMA IF NOT EXISTS myschema;
CREATE DATABASE IF NOT EXISTS mydb COMMENT 'my test db';
CREATE DATABASE IF NOT EXISTS mydb COMMENT 'my test db' LOCATION '/myhive/myoutdb';
CREATE DATABASE IF NOT EXISTS mydb COMMENT 'my test db' LOCATION '/myhive/myoutdb' MANAGEDLOCATION '/myhive/myindb';
CREATE REMOTE DATABASE IF NOT EXISTS mydb COMMENT 'my test db' LOCATION '/myhive/myoutdb' MANAGEDLOCATION '/myhive/myindb' WITH DBPROPERTIES ('creator' = 'ypc', 'date' = '2021-03-09');
CREATE SCHEMA IF NOT EXISTS myschema COMMENT 'my test myschema';
CREATE SCHEMA IF NOT EXISTS myschema COMMENT 'my test myschema' LOCATION '/myhive/myoutschema';
CREATE SCHEMA IF NOT EXISTS myschema COMMENT 'my test myschema' LOCATION '/myhive/myoutschema' MANAGEDLOCATION '/myhive/myinschema';
CREATE SCHEMA IF NOT EXISTS myschema COMMENT 'my test myschema' LOCATION '/myhive/myoutschema' MANAGEDLOCATION '/myhive/myinschema' WITH DBPROPERTIES ('creator' = 'ypc', 'date' = '2021-03-09');