Print clob data out : DBMS_LOB « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create or replace procedure print_clob( p_clob in clob )
  2  as
  3       l_offset number default 1;
  4  begin
  5     loop
  6       exit when l_offset > dbms_lob.getlength(p_clob);
  7       dbms_output.put_line( dbms_lob.substr( p_clob, 255, l_offset ) );
  8       l_offset := l_offset + 255;
  9     end loop;
 10  end;
 11  /

Procedure created.

SQL>
SQL>
SQL>








31.12.DBMS_LOB
31.12.1.DBMS_LOB Package
31.12.2.Print clob data out
31.12.3.Use dbms_lob.getlength to get the length of a clob data
31.12.4.Show Java source file
31.12.5.Use dbms_lob package to deal with clob data
31.12.6.Use dbms_lob.getlength and dbms_lob.substr with blob type column
31.12.7.Use dbms_lob.substr to get part of clob data
31.12.8.DBMS_LOB.READ
31.12.9.Load a file