While updating a row in partitioned table, got below error.

 

SQL> update RANGE_TAB set TIME_LINE=sysdate-2 where QUANT=100;
update RANGE_TAB set TIME_LINE=sysdate-2 where QUANT=100
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change

 

Solution:

This error occurs, if we are trying to update a column( which is partitioned key), where the new value is outside the range of the existing partition, then it will fail.

To fix it enable row movement.

 

SQL> alter table RANGE_TAB enable row movement;

Table altered.

SQL> update RANGE_TAB set TIME_LINE=sysdate-2 where QUANT=100;

3 rows updated.