Oracle convert xmltype to clob in select statement
Previous Next JavaScript must be enabled to correctly display this content
- SecureFiles and Large Objects Developer's Guide
- PL/SQL Semantics for LOBs
- Explicit Data Type Conversion Functions
6.2 Explicit Data Type Conversion Functions
This section describes the explicit conversion functions in SQL and PL/SQL to convert other data types to and from CLOB , NCLOB , and BLOB data types.
- TO_CLOB() : Converts from VARCHAR2 , NVARCHAR2 , or NCLOB to a CLOB
- TO_NCLOB() : Converts from VARCHAR2 , NVARCHAR2 , or CLOB to an NCLOB
- TO_BLOB(varchar|clob, destcsid,[mime_type]) : Converts the object from its current character set to the given character set in destcsid . The resultant object is BLOB . Following are various ways in which you can use the conversion function:
- TO_BLOB(character, destcsid)
- TO_BLOB(character, destcsid, mime_type)
- TO_BLOB(clob, destcsid)
- TO_BLOB(clob, destcsid, mime_type)
If the destcsid is 0, then it converts to the database character set ID. The parameter mime_type is applicable only to INSERT and UPDATE statements on Secure File LOB columns. If the mime_type parameter is used in SELECT statements or in temporary or BasicFile LOB s, then it is ignored.
Note: TO_BLOB(CLOB) is not supported.