Oracle8i SQL Reference Release 2 (8.1.6) A76989-01 |
|
Functions, 102 of 121
TO_LOB
converts LONG
or LONG RAW
values in the column long_column to LOB values. You can apply this function only to a LONG
or LONG RAW
column, and only in the SELECT
list of a subquery in an INSERT
statement (see "INSERT").
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 LONG RAW
s, create a BLOB
column.
Given the following tables:
CREATE TABLE long_table (n NUMBER, long_col LONG); CREATE TABLE lob_table (n NUMBER, lob_col CLOB);
use this function to convert LONG
to LOB values as follows:
INSERT INTO lob_table SELECT n, TO_LOB(long_col) FROM long_table;
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|