Skip to content
Home » Oracle » How to Resolve ORA-22858: invalid alteration of datatype

How to Resolve ORA-22858: invalid alteration of datatype

ORA-22858

When we tried to convert VARCHAR2 to CLOB, we got ORA-22858.

SQL> alter table hr.locations modify (city clob);
alter table hr.locations modify (city clob)
                                 *
ERROR at line 1:
ORA-22858: invalid alteration of datatype

ORA-22858 means that we can't convert the data type of current column to the data type you specified in ALTER TABLE MODIFY statement. VARCHAR2 and CLOB can't be interchangeable because they are not in the same major data type.

To solve such problem, you may refer to: How to Modify VARCHAR2 to CLOB of a Column.

Leave a Reply

Your email address will not be published. Required fields are marked *