且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ORA-06502之后如何在Oracle 11g PL/SQL中将VARCHAR2转换为BLOB

更新时间:2021-10-22 15:15:11

有一个名为utl_raw.cast_to_raw(vc)的函数,该函数将varchar2转换为BLOB值.

there is a function called utl_raw.cast_to_raw(vc) which transforms a varchar2 into a BLOB value.

但是,我建议使用CLOB来存储字符串值. BLOB完全没有字符语义,即NLS_LANG设置被忽略.

However, I recommend to use CLOB to store string values. BLOB has no character semantics at all, i.e., NLS_LANG settings are ignored.

如果要将VARCHAR2转换为CLOB,只需使用TO_CLOB

if you want to transform VARCHAR2 to CLOB, simply use TO_CLOB