老铁执行sql不好使吧??? 不要慌 往下看
↓↓↓
DB2大多数情况下不能直接修改数据类型,特别已经存在数据的情况下,
解决方法如下:
//增加一列
alter table fs_payment_main add column fd_description1 CLOB(100000);
//将老数据赋值到新列
update fs_payment_main set fd_description1=fd_description;
//删除旧列
alter table fs_payment_main drop column fd_description;
//重命名新列为旧列名称
alter table fs_payment_main rename column fd_description1 to fd_description;
//重构表
reorg table fs_payment_main;