Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Clobs and DBMS_LOB
I was recently looking over someone elses code and noticed that they
were using CLOB's in PLSQL just like varchars, eg:
declare
v_clob clob;
begin
v_clob := v_clob||'some text';
dbms_output.put_line (v_clob);
end;
/
In the past I would have always coded this as:
declare
v_clob clob;
begin
dbms_lob.createTemporary( v_clob );
dbms_lob.writeappend( v_clob, length('some text'), 'some_text');
dbms_output.put_line ( dbms_lob.substr(v_clob,255,1) );
dbms_lob.freeTemporary( v_clob );
end;
/
Obviously my version is much more code. Is there any reason for me to continue to do this and what version of Oracle allowed you to start manipulating clobs so easily? Are there any performance considerations between the two methods?
I am running 9.2.0.6 at the moment.
Thanks,
Stephen. Received on Wed Mar 01 2006 - 10:33:21 CST
![]() |
![]() |