clob type data as string : Clob « Data Type « Oracle PL / SQL






clob type data as string

 

SQL> CREATE TABLE nmyTable (
  2    id INTEGER PRIMARY KEY,
  3    nclobData NCLOB
  4  );

Table created.

SQL> CREATE TABLE myTable (
  2    id INTEGER PRIMARY KEY,
  3    clobData CLOB
  4  );

Table created.

SQL>
SQL> CREATE OR REPLACE PROCEDURE nclob_example
  2  AS
  3    clobVariable CLOB := 'It is the east and Juliet is the sun';
  4    nclobVariable NCLOB;
  5  BEGIN
  6    INSERT INTO nmyTable (id, nclobData) VALUES (1, clobVariable);
  7
  8    SELECT nclobData INTO clobVariable FROM nmyTable WHERE id = 1;
  9
 10    DBMS_OUTPUT.PUT_LINE('clobVariable = ' || clobVariable);
 11  END nclob_example;
 12  /

Procedure created.

SQL>
SQL> drop table myTable;

Table dropped.

SQL> drop table nmyTable;

Table dropped.

   
  








Related examples in the same category

1.clob data type
2.Use clob type in PL/SQL
3.Use dbms_lob.erase to remove value from clob type value
4.Use dbms_lob.fileopen to open bfile
5.Creating an Internal LOB Table
6.Copying Internal LOBs
7.Appending and Writing to LOBs
8.DBMS_LOB package.
9.Print out the length of the CLOBs previously INSERTed
10.Compare clob data
11.Compare two clobs
12.Append data to clob
13.Assign string value to clob type variable
14.Clob type column
15.Copy clob data
16.In() function with clob data
17.Initialize clob
18.Read clob type data, DBMS_LOB.READ
19.Use between ... and with clob data
20.Use clob to store xml data
21.erase clob data
22.use like operator with clob type data