Return to Snippet

Revision: 71735
at March 6, 2017 15:17 by bbrumm


Initial Code
CREATE TABLE first_table (
id NUMBER,
longval LONG
);

INSERT INTO first_table (id, longval) VALUES (1, 120034);


CREATE TABLE second_table (
id NUMBER,
clobval CLOB
);

INSERT INTO second_table (id, clobval) (
SELECT id, TO_LOB(longval) FROM first_table
);

SELECT id, clobval
FROM second_table;

Initial URL
http://www.databasestar.com/oracle-to_lob/

Initial Description
A few examples of the TO_LOB function.

Initial Title
Oracle TO_LOB Function

Initial Tags
sql, Oracle

Initial Language
SQL