Oracle 中数据类型变更无效 ---ora-22858:数据类型的变更无效 for clod

时间:2025-03-12 07:19:53

报错原因:

ORACLE直接将varchar2修改为clob会报错

解决方法

假设:你的表名:TableName
需要修改的字段:Column
辅助的字段:ChangeB
通过替换的方法分4步进行:

 table TableName add Column_B clob
 TableName set Column_B = Column;
 table TableName drop column  Column;
 table TableName rename column Column_B to Column;