1、在oracle中,一單物理表中已存儲有數據,則由Varchar2字段轉爲Clob字段會報錯;不能轉。
2、可用以下方法轉,示例代碼如下:
--重命名要修改字段
alter table sys_param_configure rename column C_VALUE to C_VALUE_TEMP;
--新建一個該字段
alter table cos_sys_param_configure add C_VALUE clob;
--將之前的數據同步到新建字段中
update cos_sys_param_configure set C_VALUE=trim(C_VALUE_TEMP);
--刪除無用字段
alter table cos_sys_param_configure drop column C_VALUE_TEMP;