RSS Feed for This PostCurrent Article

Oracle Compress Table Problem ?

Your Ad Here

An interesting finding…

create table test_table
(
col_1 number
)
compress;

alter table test_table add (col_2 number);

insert into test_table values(1,2);

After this, try to drop one column

alter table test_table drop column col_2;

ORA-39726: unsupported add/drop column operation on compressed tables

This is expected as the table is still compressed.

alter table test_table nocompress;

alter table test_table drop column col_2;

ORA-39726: unsupported add/drop column operation on compressed tables

Even I set the table to nocompress, still the same error appeared.

Then I do this

alter table test_table set unused(col_2);

alter table test_table drop unused columns;

I can drop the column this way.

But then if I want to add another column with default value..

alter table test_table add (col_2 number default 1);

ORA-39726: unsupported add/drop column operation on compressed tables

How do I add the column with default value ??


Trackback URL


RSS Feed for This PostPost a Comment