ORA-14402: updating partition key column would cause a partition change

—LOCAL REPLICATE THE ERROR:——————–

create table partition_test(
key number(5))
partition by range(key)
(partition p1 values less than (100),
partition p2 values less than (200),
partition p3 values less than (300),
partition p4 values less than (maxvalue));

Table created.

SQL> insert into partition_test values(1);

1 row created.

SQL> commit;

Commit complete.

SQL> update partition_test set key=key+100;
update partition_test set key=key+100
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change

SQL> alter table partition_test enable row movement;

Table altered.

SQL> update partition_test set key=key+100;

1 row updated.

SQL> commit;

Commit complete.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s