Syntax

Purpose

TO_LOB converts LONG or LONGRAW values in the column long_column to LOB values. You can apply this function only to a LONG or LONGRAW column, and only in the SELECT list of a subquery in an INSERT statement.

Before using this function, you must create a LOB column to receive the converted LONG values. To convert LONGs, create a CLOB column. To convert LONGRAWs, create a BLOB column.

See Also:

the modify_column_options clause of ALTER TABLE for an alternative method of converting LONG columns to LOB

INSERT for information on the subquery of an INSERT statement

Example

The sample table pm.print_media has a column press_release of type LONG. This example re-creates part of the table, with LOB data in the print_media column: