如何串联BLOB字段(Oracle)? [英] How to concatenate BLOB fields (Oracle)?
本文介绍了如何串联BLOB字段(Oracle)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以将特定表中的A1和A2连接起来(例如):
IS it possible to concatenate A1 and A2 from the particular table (for example):
CREATE TABLE MY_SCHEME.CONC_BLOB
(
A1 BLOB,
A1_SORT NUMBER(20),
T_TYPE VARCHAR2(9 BYTE),
A2 BLOB,
A2_SORT NUMBER(20),
A3 VARCHAR2(32 BYTE),
A4 BLOB,
A5 VARCHAR2(8 BYTE)
)
? 怎么样?
推荐答案
BLOB可以与DBMS_LOB包(尤其是APPEND过程)连接.但是您将需要使用一些在相关行上进行迭代并调用该过程的PL/SQL.
BLOBs can be concatenated with the DBMS_LOB package, in particular with the APPEND procedure. But you will need to use some PL/SQL that iterates over the relevant rows and calls the procedure.
我不太了解下一张桌子的意思,所以我不能举一个例子.
I don't quite understand what you mean by next table so I can't give you an example.
更新:
相关的PL/SQL可能如下所示:
The relevant piece of PL/SQL could look like this:
DECLARE
a1_lob BLOB;
a2_lob BLOB;
BEGIN
SELECT A1, A2 INTO a1_lob, a2_lob
FROM CONC_BLOB
WHERE A1_SORT = 'some value'
FOR UPDATE;
dbms_lob.append(a1_lob, a2_lob);
COMMIT;
END;
这篇关于如何串联BLOB字段(Oracle)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文