My Oracle Support Banner

How to Convert from Long Raw to BLOB/CLOB using PL/SQL (Doc ID 1012454.7)

Last updated on NOVEMBER 11, 2019

Applies to:

PL/SQL - Version and later
Oracle Solaris on SPARC (32-bit)



This article contains information on how to convert LONG/LONG RAW  into BLOB/CLOB using PL/SQL.

To convert
LONG/LONG RAW with any size to BLOB/CLOB the SQL functions
  • to_lob()
  • to_clob()
can be used in Oracle 10gR2 ( and higher.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 - NOT in PLSQL as conversion function.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.