Conversion of Longs to LOBs : Long « Data Type « Oracle PL / SQL






Conversion of Longs to LOBs

  
SQL>
SQL>
SQL> CREATE TABLE myTable (
  2     id NUMBER,
  3     text LONG);

Table created.

SQL>
SQL> INSERT INTO myTable (id, text)VALUES (1, 'Change the column from LONG to CLOB');

1 row created.

SQL>
SQL> ALTER TABLE myTable
  2  MODIFY text CLOB;

Table altered.

SQL>
SQL> DESC myTable
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 TEXT                                               CLOB

SQL>
SQL> drop table myTable;

Table dropped.

   
    
  








Related examples in the same category

1.Set long: query a table or view that has a LONG column
2.Change column type from long to clob
3.Demonstrate a method of converting to a LONG column to CLOB:
4.Insert char value to long type column
5.Long raw type column
6.Long type column