【Oracle】用SQL语句修改clob/blob字段


clob/blob可以像普通字段一样用SQL语句操作,并非一定要编码应对,请看:

定义表:

create table emp(
    id number(12),
    f1 clob,
    f2 blob
);

操作语句:

SQL> insert into emp(id,f1,f2) values(1,'1','1');

已创建 1 行。

SQL> update emp set f1='22' where id=1;

已更新 1 行。

SQL> update emp set f2='333' where id=1;

已更新 1 行。

SQL> commit;

SQL> select * from emp;

        ID F1                   F2
---------- -------------------- --------------------
         1 22                   0333

END

相关