增加列:
oltp:可以增加一列指定默认值并且为not null的的列,如果指定默认值,但是可为空是不支持oltp压缩方式的
If a default value is specified for an added column, then the column must beNOT
NULL
. Added nullable columns with default values are not supported.
basic:你不能给增加的列指定默认值
删除列:
oltp:oltp 压缩方式可以支持列的删除列,但是为了避免长时间的解压缩和再压缩 可以设置 列的unused
DROP
COLUMN
is supported, but internally the database sets the columnUNUSED
to avoid long-running decompression and
recompression operations.
basic:不支持删除列 Dropping a column is not supported.
basic方式不能指定默认值:
SQL> select table_name,blocks,compress_for From dba_tables where table_name='T3';
TABLE_NAME BLOCKS COMPRESS_FOR
------------------------------ ---------- ------------
T3 302 BASIC
SQL> ALTER TABLE T3 ADD X NUMBER;
表已更改。
SQL> ALTER TABLE T3 ADD X1 NUMBER DEFAULT 0;
ALTER TABLE T3 ADD X1 NUMBER DEFAULT 0
*
第 1 行出现错误:
ORA-39726: 不支持对压缩表执行添加/删除列操作