php oracle数据库NCOLB字段ORA-01704
对clob更新 ORA-01704: 字符串文字太长
解决办法:把字符赋值给一个变量,然后赋值update语句
declare
v_clob clob :='字符 内容';beginUPDATE cc SET py.pk_priceunitarea = v_clob ; end;查看clob内容可以用语句查看
select dbms_lob.substr(vusercorp) from cc d where d.pk_fundprice = ‘cc’
例如:
题主用的phalcon框架
$text = base64_encode($text); $id = 'cb9424db95e25309b61a5f20e52eb482'; //pdo数据增加; yii自带的yii::$app->db,nclob数据超过1024无法入库 $sql = " DECLARE REALLYBIGTEXTSTRING NCLOB := '{$text}'; BEGIN update WX_CHECKIN set BOARDING=REALLYBIGTEXTSTRING where ID = '{$id}'; END;"; $success = $this->db->execute($sql, Phalcon\Db::FETCH_ASSOC);