fill a varchar2 type data with rpad : to_clob « Large Objects « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE TABLE myClobTable (id NUMBER,clob_data CLOB);

Table created.

SQL>
SQL> declare
  2    x varchar2(32767):=rpad('A',32767,'B');
  3    y clob;
  4  begin
  5    y :=to_clob(x);
  6    insert into myClobTable values (200,y);
  7  end;
  8  /

PL/SQL procedure successfully completed.

SQL>
SQL> drop table myClobTable;

Table dropped.

SQL>
SQL>
SQL>








34.8.to_clob
34.8.1.Copying LONG to LOB with the TO_CLOB and TO_BLOB functions
34.8.2.fill a varchar2 type data with rpad