Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Clobs and DBMS_LOB

Clobs and DBMS_LOB

From: stephen O'D <stephen.odonnell_at_gmail.com>
Date: 1 Mar 2006 08:33:21 -0800
Message-ID: <1141230801.004638.23640@e56g2000cwe.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US