--Test convert Long to Blob;
create table long_test(
field1 Long;
);
/
alter table long_test add field2 Blob;
/
alter table long_test modify field1 Clob;
/
declare
c clob;
扫描二维码关注公众号,回复:
1280401 查看本文章
![](/qrcode.jpg)
cursor cv_clob is
select field1 from long_test;
begin
open cv_clob;
LOOP
FETCH cv_clob
INTO c;
update long_test set field2 = c2b(c);
EXIT WHEN cv_clob%NOTFOUND;
END LOOP;
commit;
end;
/
alter table long_test drop column field1;
/
alter table long_test rename column field2 to field1;