本文為您介紹遷移 Oracle 資料庫的資料至 OceanBase 資料庫 Oracle 租戶時,ALTER TABLE DDL 的支援轉換範圍。
總覽
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 }
支援的範圍
支援
alter_table_properties
子句,詳情請參見 修改、刪除和新增表屬性。支援
column_clauses
子句,詳情請參見 修改、刪除和新增列屬性。支援
constraint_clauses
子句,詳情請參見 修改、刪除和新增約束。支援
alter_table_partitioning
子句,詳情請參見 修改、刪除和新增分區。
不支援的範圍
不支援
alter_external_table
子句修改外部表格的特徵,會報錯。不支援
move_table_clause
子句將非分區表的資料或分區表的分區的資料重定位至新 segment,會報錯。不支援
modify_to_partitioned
子句將非分區或分區表更改為指定特性的分區或複合分區表,會報錯。不支援
modify_opaque_type
子句指示資料庫儲存指定的抽象資料類型或使用解壓縮儲存,會報錯。不支援
immutable_table_clauses
子句修改不可變表的定義,會報錯。不支援
blockchain_table_clauses
子句修改區塊鏈表的定義,會報錯。不支援
memoptimize_read_clause
子句提高高頻資料查詢操作的效能,會報錯。不支援
memoptimize_write_clause
子句啟用快速寫入,會報錯。不支援
enable_disable_clause
子句定義資料庫如何使用約束,會報錯。不支援
enable_disable_other_clause
子句定義啟用或禁用與表關聯的所有觸發器、啟用禁用表鎖、啟用或禁用查詢CONTAINER MAP
映射後的表、啟用或禁用該 CONTAINERS 的表,會報錯。