例子:
REM lobcopy.sql
REM Version 1.0, last updated 8/8/97
REM This file demonstrates the DBMS_LOB.COPY routine, as described in
REM Chapter 21 of _Oracle8 PL/SQL Programming_ by Scott Urman.SET SERVEROUTPUT on
DECLARE
v_Lob1 CLOB;
v_Lob2 CLOB;
BEGIN
-- Retrieve source lob locator.
SELECT clob_col
INTO v_Lob1
FROM lobdemo
WHERE key = 1; -- Retrieve destination lob locator.
SELECT clob_col
INTO v_Lob2
FROM lobdemo
WHERE key = 2; -- Copy all 26 characters from v_Lob1 onto the end of v_Lob2, starting
-- at offset 50. Since v_Lob2 isn't 50 characters long, spaces will
-- be inserted.
DBMS_LOB.COPY(v_Lob2, v_Lob1, 26, 50, 1); -- And output the result.
LOBPrint(v_Lob2);
END;
/
REM lobcopy.sql
REM Version 1.0, last updated 8/8/97
REM This file demonstrates the DBMS_LOB.COPY routine, as described in
REM Chapter 21 of _Oracle8 PL/SQL Programming_ by Scott Urman.SET SERVEROUTPUT on
DECLARE
v_Lob1 CLOB;
v_Lob2 CLOB;
BEGIN
-- Retrieve source lob locator.
SELECT clob_col
INTO v_Lob1
FROM lobdemo
WHERE key = 1; -- Retrieve destination lob locator.
SELECT clob_col
INTO v_Lob2
FROM lobdemo
WHERE key = 2; -- Copy all 26 characters from v_Lob1 onto the end of v_Lob2, starting
-- at offset 50. Since v_Lob2 isn't 50 characters long, spaces will
-- be inserted.
DBMS_LOB.COPY(v_Lob2, v_Lob1, 26, 50, 1); -- And output the result.
LOBPrint(v_Lob2);
END;
/
解决方案 »
- 请问windows 7 64位机器 怎么连接oracle 9i 啊
- 求一段oracle代码,循环插入数据
- 急求解决数据库方面
- oracle中:如何得到一条记录的插入日期????
- Oracle 一个查询跟新语句的问题
- 一个SQL语句
- 如何在oracle存储过程中使用partiton 啊,想用for循环实现
- 请问数据库课程设计的角色分工
- 找有开发电信综合营帐系统经验的朋友合作。(急)
- oracle数据库报错:ORA-01147: ORA-01110: ora-01033,这是alter.log的日志文件,请问是什么错误!急···
- 急!这个sql如何写
- 各位oracle高手,能不能帮我介绍一下,关于truncr这个函数的具体用法及一些常用的功能?
建表时,用用了clob字段,编译不通过。
如何解决?
compatible = 8.1.5.0.0
好像不行。
原来该错地方了。现在可以在8i上使用clob了。
还想请教,在8.0.5上可以使用clob吗,如何设置。