Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
antlr_supported_sql.oracle.ddl.create.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?>
<sql-cases db-types="Oracle" namespace="oracle.ddl.create">
<!-- -->
<sql-case id="create_table" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_space" value=" CREATE TABLE t_order_item (
item_id NUMBER(10),
order_id NUMBER(10),
user_id NUMBER(10),
status VARCHAR2(10),
column1 VARCHAR2(10),
column2 VARCHAR2(10),
column3 VARCHAR2(10)
)" />
<sql-case id="create_table_with_quota" value="CREATE TABLE "t_order" ("order_id" NUMBER(10), "user_id" NUMBER(10), "status" VARCHAR2(10), "column1" VARCHAR2(10), "column2" VARCHAR2(10), "column3" VARCHAR2(10))" />
<sql-case id="create_global_temporary_table" value="CREATE GLOBAL TEMPORARY TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_column_not_null" value="CREATE TABLE t_order (order_id NUMBER(10) NOT NULL, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_column_default" value="CREATE TABLE t_order (order_id NUMBER(10) DEFAULT ON NULL 0, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_column_increment" value="CREATE TABLE t_order (order_id NUMBER(10) GENERATED BY DEFAULT AS IDENTITY START WITH 1 MAXVALUE 100, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_column_encrypt" value="CREATE TABLE t_order (order_id NUMBER(10) ENCRYPT USING 'encrypt_algorithm' IDENTIFIED BY '123456', user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_inline_primary_key" value="CREATE TABLE t_order (order_id NUMBER(10) CONSTRAINT pk_order_id PRIMARY KEY, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_inline_unique_key" value="CREATE TABLE t_order (order_id NUMBER(10) CONSTRAINT uk_order_id UNIQUE, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_inline_foreign_key" value="CREATE TABLE t_order_item (item_id NUMBER(10), order_id NUMBER(10) CONSTRAINT fk_order_id REFERENCES t_order (order_id) ON DELETE CASCADE, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_inline_check" value="CREATE TABLE t_order (order_id NUMBER(10) CONSTRAINT chk_order_id CHECK (order_id > 0), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_inline_constraints" value="CREATE TABLE t_order_item (item_id NUMBER(10) PRIMARY KEY UNIQUE NOT NULL CHECK (order_id > 0), order_id NUMBER(10) CONSTRAINT fk_order_id REFERENCES t_order (order_id) ON DELETE CASCADE, user_id NUMBER(10), status VARCHAR2(10) NULL, column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_out_of_line_primary_key" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT pk_order_id PRIMARY KEY (order_id))" />
<sql-case id="create_table_with_out_of_line_composite_primary_key" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT pk_order_id_user_id_status PRIMARY KEY (order_id, user_id, status))" />
<sql-case id="create_table_with_out_of_line_unique_key" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT uk_order_id UNIQUE (order_id))" />
<sql-case id="create_table_with_out_of_line_composite_unique_key" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT uk_order_id UNIQUE (order_id, user_id, status))" />
<sql-case id="create_table_with_out_of_line_foreign_key" value="CREATE TABLE t_order_item (item_id NUMBER(10), order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT fk_order_id FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON DELETE CASCADE)" />
<sql-case id="create_table_with_out_of_line_composite_foreign_key" value="CREATE TABLE t_order_item (item_id NUMBER(10), order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT fk_order_id FOREIGN KEY (order_id, user_id, status) REFERENCES t_order (order_id, user_id, status) ON DELETE CASCADE)" />
<sql-case id="create_table_with_out_of_line_check" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), CONSTRAINT chk_order_id CHECK (order_id > 0))" />
<sql-case id="create_table_with_out_of_line_constraints" value="CREATE TABLE t_order_item (item_id NUMBER(10), order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10), PRIMARY KEY (item_id), UNIQUE (item_id), FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON DELETE CASCADE), CHECK (item_id > 0))" />
<sql-case id="create_table_with_exist_index" value="CREATE TABLE t_order (order_id NUMBER(10) PRIMARY KEY USING INDEX idx_order_id, user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_create_index" value="CREATE TABLE t_order (order_id NUMBER(10) PRIMARY KEY USING INDEX (CREATE INDEX idx_order_id ON t_order (order_id)), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10))" />
<sql-case id="create_table_with_partition" value="CREATE TABLE t_order (order_id NUMBER(10), user_id NUMBER(10), status VARCHAR2(10), column1 VARCHAR2(10), column2 VARCHAR2(10), column3 VARCHAR2(10)) PARTITION BY HASH (order_id) PARTITIONS 2" />
<!--
<sql-case id="create_table_with_select" value="CREATE TABLE t_order_bak AS SELECT * FROM t_order" />
-->
<sql-case id="create_index" value="CREATE INDEX idx_order_id ON t_order (order_id)" />
<sql-case id="create_index_with_space" value=" CREATE INDEX
idx_order_id
ON
t_order (order_id) " />
<sql-case id="create_index_with_quota" value="CREATE INDEX "idx_order_id" ON "t_order" ("order_id")" />
<sql-case id="create_composite_index" value="CREATE INDEX idx_order_id_user_id_status ON t_order (order_id, user_id, status)" />
<sql-case id="create_unique_index" value="CREATE UNIQUE INDEX uk_order_id ON t_order (order_id)" />
<sql-case id="create_index_with_function" value="CREATE INDEX idx_upper_status ON t_order (UPPER(status))" />
</sql-cases>