This topic describes the conversion scope of ALTER TABLE DDL operations during data migration from an Oracle database to the Oracle compatible mode 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_propertiesclause is supported. For more information, see Modify, drop, and add table attributes.Modifying, dropping, and adding column attributes by using the
column_clausesclause is supported. For more information, see Modify, drop, and add column attributes.Modifying, dropping, and adding constraints by using the
constraint_clausesclause is supported. For more information, see Modify, drop, and add constraints.Modifying, dropping, and adding partitions by using the
alter_table_partitioningclause is supported. For more information, see Modify, drop, and add partitions.
Unsupported operations
Modifying the characteristics of external tables by using the
alter_external_tableclause is not supported. An error will be returned when you perform this operation.Relocating the data of a non-partitioned table or a partition of a partitioned table to a new segment by using the
move_table_clauseclause is not supported. An error will be returned when you perform this operation.Changing a non-partitioned table or a partitioned table into a partitioned or composite partitioned table with specified characteristics by using the
modify_to_partitionedclause is not supported. An error will be returned when you perform this operation.Specifying the database to store an abstract data type or enable decompressed storage by using the
modify_opaque_typeclause 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_clausesclause 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_clausesclause is not supported. An error will be returned when you perform this operation.Improving the query performance for high-frequency data by using the
memoptimize_read_clauseclause is not supported. An error will be returned when you perform this operation.Enabling fast write by using the
memoptimize_write_clauseclause is not supported. An error will be returned when you perform this operation.Defining how the database uses constraints by using the
enable_disable_clauseclause is not supported. An error will be returned when you perform this operation.Enabling or disabling all triggers associated with the table, table locks, queries on the mapped
CONTAINER MAPtable, and the table in the CONTAINERS by using theenable_disable_other_clauseclause is not supported. An error will be returned when you perform this operation.