totn Oracle Functions

Oracle / PLSQL: TO_LOB Function

This Oracle tutorial explains how to use the Oracle/PLSQL TO_LOB function with syntax and examples.

Description

The Oracle/PLSQL TO_LOB function converts LONG or LONG RAW values to LOB values.

Syntax

The syntax for the TO_LOB function in Oracle/PLSQL is:

TO_LOB( long_column )

Parameters or Arguments

long_column
A LONG or LONG RAW value that will be converted to a LOB.

Returns

The TO_LOB function returns a LOB value.

Applies To

The TO_LOB function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle TO_LOB function examples and explore how to use the TO_LOB function in Oracle/PLSQL.

For example:

insert into companies (lob_column)
select TO_LOB(long_column)
from suppliers;

This example would convert the value in the field called long_column to a LOB value.