ops$tkyte%ORA10GR2> CREATE TABLE t
2 (
3 x int primary key,
4 dt date,
5 y varchar2(30)
6 )
7 tablespace users
8 enable row movement
9 /
Table created.
ops$tkyte%ORA10GR2> insert into t values ( 0, to_date( '12-mar-2003' ), 'hello world' );
1 row created.
ops$tkyte%ORA10GR2> alter table t shrink space compact;
Table altered.
ops$tkyte%ORA10GR2> create index t_idx on t(y) indextype is ctxsys.context parameters( 'sync(on commit)' );
Index created.
ops$tkyte%ORA10GR2> alter table t shrink space compact;
alter table t shrink space compact
*
ERROR at line 1:
ORA-10631: SHRINK clause should not be specified for this object
note that a partition key update is permitted, internally that is delete+insert and the right thing happens:
ops$tkyte%ORA10GR2> CREATE TABLE t
2 (
3 x int primary key,
4 dt date,
5 y varchar2(30)
6 )
7 tablespace users
8 enable row movement
9 PARTITION BY RANGE (dt)
10 (
11 PARTITION part1 VALUES LESS THAN (to_date('13-mar-2003','dd-mon-yyyy')) ,
12 PARTITION part2 VALUES LESS THAN (to_date('14-mar-2003','dd-mon-yyyy')) ,
13 PARTITION junk VALUES LESS THAN (MAXVALUE)
14 )
15 /
Table created.
ops$tkyte%ORA10GR2> insert into t values ( 0, to_date( '12-mar-2003' ), 'hello world' );
1 row created.
ops$tkyte%ORA10GR2> create index t_idx on t(y) indextype is ctxsys.context parameters( 'sync(on commit)' );
Index created.
ops$tkyte%ORA10GR2> select rowid, t.* from t where contains( y, 'hello' )>0;
ROWID X DT Y
------------------ ---------- --------- ------------------------------
AAAlouAAEAAAAAMAAA 0 12-MAR-03 hello world
ops$tkyte%ORA10GR2> update t set dt=dt+1;
1 row updated.
ops$tkyte%ORA10GR2> commit;
Commit complete.
ops$tkyte%ORA10GR2> select rowid, t.* from t where contains( y, 'hello' )>0;
ROWID X DT Y
------------------ ---------- --------- ------------------------------
AAAlovAAEAAAAAUAAA 0 13-MAR-03 hello world