Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Modify VARCHAR2 to CLOB -

S567Jan 19 2020 — edited Apr 15 2020

Team,

I am trying to change the datatype size from varchar2 to CLOB as my incomming data is more than 4000 BYTES.

But below statemnt is giving error.

EARLIER it was VARCHAR2(3500 BYTES);

alter table CUSTOMER

modify transaction_date CLOB ; -- Not working ..Please suggesr

Error report:

SQL Error: ORA-22858: invalid alteration of datatype

22858. 00000 -  "invalid alteration of datatype"

*Cause:    An attempt was made to modify the column type to object, REF,

           nested table, VARRAY or LOB type.

*Action:   Create a new column of the desired type and copy the current

           column data to the new type using the appropriate type

           constructor

This post has been answered by Paulzip on Jan 19 2020
Jump to Answer
Comments
Post Details
Added on Jan 19 2020
10 comments
2,780 views