Migrating from LONG to LOB

Starting from Oracle 10g, a LONG data is convertible to a LOB data in a table. This enhancement has enabled the migration of older data in LONG and LONG RAW columns to equivalent LOB data types in Oracle. The data in the LONG type column is mapped to CLOB or NCLOB data types and the data in the LONG RAW type columns is mapped to the BLOB data type. It can be achieved through the ALTER TABLE statement, where a LONG type column can be modified to the LOB type column:

ALTER TABLE [table name]
MODIFY [LONG type column] [LOB type (CLOB | BLOB)];

During migration, the Oracle server implicitly takes care of the data conversion and movement from the LONG to LOB data type. A LONG, LONG RAW, or VARCHAR2 type of data can be implicitly ...

Get Oracle Advanced PL/SQL Developer Professional Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.