This topic describes the supported conversion scope of ALTER TABLE DDL operations for dropping a specified partition during data migration from an Oracle database to the Oracle compatible mode of OceanBase Database.
Syntax
drop_table_partition:
DROP partition_extended_names
[ update_index_clauses [ parallel_clause ] ]
partition_extended_names:
{ PARTITION | PARTITIONS }
partition | { FOR ( partition_key_value [, partition_key_value ]... ) }
[, partition | { FOR ( partition_key_value [, partition_key_value ]... ) } ]...
update_index_clauses:
{ update_global_index_clause
| update_all_indexes_clause
}
update_global_index_clause:
{ UPDATE | INVALIDATE } GLOBAL INDEXES
update_all_indexes_clause:
UPDATE INDEXES
[ ( index ( update_index_partition
| update_index_subpartition
)
[, index ( update_index_partition
| update_index_subpartition
)
]...
)
]
parallel_clause:
{ NOPARALLEL | PARALLEL [ integer ] }
Supported operations
Dropping a specified partition by specifying the partition name is supported. Example:
ALTER TABLE T DROP PARTITION P0,P1 ALTER TABLE T DROP PARTITIONS P0,P1Updating global indexes in the
UPDATE GLOBAL INDEXESclause is supported. Example:ALTER TABLE T DROP PARTITION P0 UPDATE GLOBAL INDEXES;
Unsupported operations
Dropping a partition by specifying the partition key value is not supported. An error will be returned when you perform this operation. Example:
ALTER TABLE T DROP PARTITION FOR(1);The
INVALIDATE GLOBAL INDEXESclause is not supported and will be converted to theUPDATE GLOBAL INDEXESclause.
Ignored clauses and options
Note
The following clauses and options will be ignored and will not be resolved or converted when they are specified in the synchronized DDL statements.
The
update_all_indexes_clauseclause for updating indexes in a table.The
parallel_clauseclause for changing the default query and DML parallelism for a table.