DBZ-3977 Extend ALTER and TRUNCATE table Oracle DDL support
* Add support for truncating subpartitions with ALTER * Add support for dropping storage with TRUNCATE
This commit is contained in:
parent
1a2415abae
commit
e1fb3cc0e6
@ -2165,7 +2165,7 @@ upgrade_table_clause
|
||||
;
|
||||
|
||||
truncate_table
|
||||
: TRUNCATE TABLE tableview_name PURGE? SEMICOLON
|
||||
: TRUNCATE TABLE tableview_name PURGE? ((DROP ALL?|REUSE) STORAGE)? CASCADE? SEMICOLON
|
||||
;
|
||||
|
||||
drop_table
|
||||
@ -2591,6 +2591,7 @@ split_table_partition
|
||||
|
||||
truncate_table_partition
|
||||
: TRUNCATE PARTITION partition_name
|
||||
| TRUNCATE SUBPARTITION partition_name (UPDATE INDEXES)?
|
||||
;
|
||||
|
||||
exchange_table_partition
|
||||
|
@ -17,4 +17,6 @@ alter table dbz1211 add constraint name unique (id,data) using index tablespace
|
||||
alter table dbz1211_child add constraint name unique (id) using index tablespace ts;
|
||||
-- Alter table add primary key using index
|
||||
ALTER TABLE "IDENTITYDB"."CHANGE_NUMBERS" ADD CONSTRAINT "IDX_CHANGENUMBERS_PK" PRIMARY KEY ("CHANGE_NO", "EXPIRY_TIME") USING INDEX "IDENTITYDB"."IDX_CHANGENUMBERS_PK" ENABLE NOVALIDATE;
|
||||
ALTER TABLE "MYSCHEMA"."MY_PLANT" DROP PRIMARY KEY DROP INDEX;
|
||||
ALTER TABLE "MYSCHEMA"."MY_PLANT" DROP PRIMARY KEY DROP INDEX;
|
||||
-- Alter table truncate subpartition
|
||||
alter table tdo_001 truncate subpartition inbound_full_pwork update indexes;
|
||||
|
@ -0,0 +1 @@
|
||||
truncate table APP_PART_NOTES_4 drop storage;
|
Loading…
Reference in New Issue
Block a user