Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 136 of 166
to_lob::=
to_lob
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.
Before using this function, you must create a LOB column to receive the converted LONG
values. To convert LONG
s, create a CLOB
column. To convert LONG
RAW
s, create a BLOB
column.
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:
CREATE TABLE new_print_media ( product_id NUMBER(6), ad_id NUMBER(6), press_release CLOB); INSERT INTO new_print_media (SELECT p.product_id, p.ad_id, TO_LOB(p.press_release) FROM print_media p);
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|