Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert value in CLOB
<csyang_at_cisco.com> a écrit dans le message news: 3B8B03D1.A07D514C_at_cisco.com...
> Hello everyone,
>
> I have searched through the web and gotten to nowhere, so I wrote my
> question to bother whomever read this newsgroup.
>
> My question is how do I insert more than 4K of text into a CLOB column.
> I have seen examples of using SQL command "INSERT," but I know it fails
> when the text is above 4K. Therefore, how do I insert the large text?
> Thanks.
>
>
> Chien
>
v815> create table t (col clob);
Table created.
v815> declare
2 l_data long := rpad('x',5000,'x'); 3 l_clob clob; 4 begin 5 insert into t values ( empty_clob() ) returning col into l_clob; 6 dbms_lob.writeappend( l_clob, length(l_data), l_data );7 end;
PL/SQL procedure successfully completed.
v815> set long 10000
v815> select * from t;
COL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<snip>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 row selected.
-- Hope this helps MichelReceived on Tue Aug 28 2001 - 02:29:48 CDT