antlr_supported_sql.oracle.ddl.alter.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <sql-cases db-types="Oracle" namespace="oracle.ddl.alter"> <sql-case id="alter_table" value="ALTER TABLE t_order PARALLEL" /> <sql-case id="alter_table_with_space" value=" ALTER TABLE t_order PARALLEL " /> <sql-case id="alter_table_with_quota" value="ALTER TABLE "t_order" PARALLEL" /> <sql-case id="alter_table_add_column" value="ALTER TABLE t_order ADD column4 VARCHAR2(10)" /> <sql-case id="alter_table_add_columns" value="ALTER TABLE t_order ADD column4 VARCHAR2(10) ADD column5 VARCHAR2(10) ADD column6 VARCHAR2(10)" /> <sql-case id="alter_table_modify_column" value="ALTER TABLE t_order MODIFY column4 VARCHAR2(20)" /> <sql-case id="alter_table_modify_columns" value="ALTER TABLE t_order MODIFY column4 VARCHAR2(20) MODIFY column5 VARCHAR2(20) MODIFY column6 VARCHAR2(20)" /> <sql-case id="alter_table_drop_column" value="ALTER TABLE t_order DROP COLUMN user_id" /> <sql-case id="alter_table_drop_columns" value="ALTER TABLE t_order DROP COLUMN user_id DROP COLUMN column5" /> <sql-case id="alter_table_add_primary_key" value="ALTER TABLE t_order ADD CONSTRAINT pk_user_id PRIMARY KEY (user_id)" /> <sql-case id="alter_table_add_composite_primary_key" value="ALTER TABLE t_order ADD CONSTRAINT pk_order_id_user_id_status PRIMARY KEY (order_id, user_id, status)" /> <sql-case id="alter_table_add_unique_key" value="ALTER TABLE t_order ADD CONSTRAINT uk_order_id UNIQUE (order_id)" /> <sql-case id="alter_table_add_foreign_key" value="ALTER TABLE t_order_item ADD CONSTRAINT fk_order_id FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON DELETE CASCADE" /> <sql-case id="alter_table_add_check" value="ALTER TABLE t_order ADD CONSTRAINT chk_order_id CHECK (order_id > 0)" /> <sql-case id="alter_table_add_constraints" value="ALTER TABLE t_order_item ADD PRIMARY KEY (order_id) UNIQUE (order_id) CHECK (order_id > 0) FOREIGN KEY (order_id) REFERENCES t_order (order_id) ON DELETE CASCADE CHECK (order_id > 0)" /> <sql-case id="alter_table_drop_primary_key" value="ALTER TABLE t_order DROP PRIMARY KEY" /> <sql-case id="alter_table_drop_unique_key" value="ALTER TABLE t_order DROP UNIQUE (order_id)" /> <sql-case id="alter_table_drop_constraint" value="ALTER TABLE t_order DROP CONSTRAINT idx_order_id" /> <sql-case id="alter_table_drop_constraints" value="ALTER TABLE t_order DROP PRIMARY KEY DROP UNIQUE (order_id) DROP CONSTRAINT idx_order_id" /> <sql-case id="alter_table_rename_constraint" value="ALTER TABLE t_order RENAME CONSTRAINT idx_order_id_bak TO idx_order_id" /> <sql-case id="alter_index" value="ALTER INDEX idx_order_id REBUILD PARALLEL" /> <sql-case id="alter_index_with_space" value=" ALTER INDEX idx_order_id REBUILD PARALLEL " /> <sql-case id="alter_index_with_quota" value="ALTER INDEX "idx_order_id" REBUILD PARALLEL" /> <!-- <sql-case id="alter_index_rename" value="ALTER INDEX idx_order_id_bak RENAME TO idx_order_id" /> --> </sql-cases>