Wednesday, October 8, 2014

Oracle: An attempt was made to modify an object, REF, VARRAY, nested table, or LOB column type

Here is what you can do to change a column of type VARCHAR2(4000) to a CLOB since you will get the error if simply using 'alter table EMAIL modify (TEMPLATE_CONTENT clob)':

alter table EMAIL  add (temp clob);

update EMAIL set temp=EMAIL_BODY, EMAIL_BODY=null;

alter table EMAIL drop column EMAIL_BODY;
alter table EMAIL rename column temp to EMAIL_BODY;

No comments:

Post a Comment