This topic describes the supported conversion scope of ALTER TABLE DDL operations during data migration from an Oracle database to an Oracle tenant of OceanBase Database.
Syntax
ALTER TABLE [ schema. ] table
[ memoptimize_read_clause ]
[ memoptimize_write_clause ]
[ alter_table_properties
| column_clauses
| constraint_clauses
| alter_table_partitioning
| alter_external_table
| move_table_clause
| modify_to_partitioned
| modify_opaque_type
| immutable_table_clauses
| blockchain_table_clauses
]
[ enable_disable_clause
| enable_disable_other_clause
] ...
;
memoptimize_read_clause:
[ { (MEMOPTIMIZE FOR READ) | (NO MEMOPTIMIZE FOR READ) } ]
memoptimize_write_clause:
[ { (MEMOPTIMIZE FOR WRITE) | (NO MEMOPTIMIZE FOR WRITE) } ]
alter_external_table:
{ add_column_clause
| modify_column_clauses
| drop_column_clause
| parallel_clause
| external_table_data_props
| REJECT LIMIT { integer | UNLIMITED }
| PROJECT COLUMN { ALL | REFERENCED }
}
[ add_column_clause
| modify_column_clauses
| drop_column_clause
| parallel_clause
| external_table_data_props
| REJECT LIMIT { integer | UNLIMITED }
| PROJECT COLUMN { ALL | REFERENCED }
]...
move_table_clause:
MOVE
[ filter_condition ]
[ ONLINE ]
[ segment_attributes_clause ]
[ table_compression ]
[ index_org_table_clause ]
[ { LOB_storage_clause | varray_col_properties }... ]
[ parallel_clause ]
[ allow_disallow_clustering ]
[ UPDATE INDEXES
[ ( index { segment_attributes_clause
| update_index_partition }
[, index { segment_attributes_clause
| update_index_partition } ]...
)
]
]
modify_to_partitioned:
MODIFY table_partitioning_clauses
[ filter_condition ]
[ ONLINE ]
[ UPDATE INDEXES [ ( index { local_partitioned_index | global_partitioned_index | GLOBAL }
[, index { local_partitioned_index | global_partitioned_index | GLOBAL } ]... )
]
]
modify_opaque_type:
MODIFY OPAQUE TYPE anydata_column
STORE ( type_name [, type_name ]... ) UNPACKED
immutable_table_clauses:
[ immutable_table_no_drop_clause ]
[ immutable_table_no_delete_clause ]
blockchain_table_clauses:
blockchain_drop_table_clause
blockchain_row_retention_clause
blockchain_hash_and_data_format_clause
enable_disable_clause:
{ ENABLE | DISABLE }
[ VALIDATE | NOVALIDATE ]
{ UNIQUE (column [, column ]...)
| PRIMARY KEY
| CONSTRAINT constraint_name
}
[ using_index_clause ]
[ exceptions_clause ]
[ CASCADE ]
[ { KEEP | DROP } INDEX ]
enable_disable_other_clause:
{ ENABLE | DISABLE }
{ TABLE LOCK | ALL TRIGGERS | CONTAINER_MAP | CONTAINERS_DEFAULT }
Supported operations
Modifying, dropping, and adding table attributes by using the
alter_table_properties
option is supported. For more information, see Modify, drop, and add table attributes.Modifying, dropping, and adding column attributes by using the
column_clauses
clause is supported. For more information, see Modify, drop, and add column attributes.Modifying, dropping, and adding constraints by using the
constraint_clauses
clause is supported. For more information, see Modify, drop, and add constraints.Modifying, dropping, and adding partitions by using the
alter_table_partitioning
option is supported. For more information, see Modify, drop, and add partitions.
Unsupported operations
Modifying features of external tables by using the
alter_external_table
option is not supported. An error will be returned when you perform this operation.Relocating data from a nonpartitioned table or a partition of a partitioned table into a new segment by using the
move_table_clause
clause is not supported. An error will be returned when you perform this operation.Changing a nonpartitioned table or a partitioned table into a partitioned or composite partitioned table with specified characteristics by using the
modify_to_partitioned
option is not supported. An error will be returned when you perform this operation.Instructing the database to store the specified abstract data type or use unpacked storage by using the
modify_opaque_type
clause is not supported. An error will be returned when you perform this operation.Modifying the definition of an immutable table by using the
immutable_table_clauses
clause is not supported. An error will be returned when you perform this operation.Modifying the definition of a blockchain table by using the
blockchain_table_clauses
clause is not supported. An error will be returned when you perform this operation.Improving the query performance on high-frequency data by using the
memoptimize_read_clause
clause is not supported. An error will be returned when you perform this operation.Enabling fast write by using the
memoptimize_write_clause
clause is not supported. An error will be returned when you perform this operation.Enabling or disabling constraints by using the
enable_disable_clause
clause is not supported. An error will be returned when you perform this operation.Enabling or disabling all triggers associated with a table, table locks, queries for the mapped
CONTAINER MAP
table, and the CONTAINERS table by using theenable_disable_other_clause
clause is not supported. An error will be returned when you perform this operation.