Working with very large text data and CLOB column

前端 未结 3 1709
青春惊慌失措
青春惊慌失措 2020-12-06 03:30

According to documentation CLOB and NCLOB datatype columns, can store up to 8 terabytes of character data.

I have text, which contains 100 000 character, how can I

3条回答
  •  误落风尘
    2020-12-06 03:50

    You should use the dbms_lob package, the procedure to add some string to the clob is dbms_lob.append.

    DBMS_LOB documentation

    declare
      c1 clob;
      c2 varchar2(32000);
    begin
      c1 := 'abc';
      c2 := 'text, which contains 32 000 characters';
      dbms_lob.append(c1, c2);
      c2 := 'some more text, which contains 32 000 characters';
      dbms_lob.append(c1, c2);
      insert into t1 values (c1);
    end;
    

提交回复
热议问题