Hi , Until now i am using the normal update command in PL/SQL Block for updating new values in clob column. Recently read about the DBMS_LOB package and its usages but i am unable to distinguish the difference between normal update / DBMS_LOB.WRITE of clob column in a table with new value
Scenario updating the new values in the clob column .
If any one can update me the usage of dbms_lob usage it would be an great help to me .
desc z_export
Name Null Type
----- ---- ----
ID NUMBER
VALUE CLOB
-- Normal updated
;
BEGIN
UPDATE z_export
SET value = '<CPF><requesttype>ReferenceType</requesttype>'
WHERE id =1;
END;
/
-- dbms_clob update
DECLARE
l_clob CLOB;
l_value VARCHAR2(500) := '<CPF><requesttype>ReferenceType</requesttype>sample update ';
BEGIN
SELECT value INTO l_clob FROM z_export WHERE id=1 FOR UPDATE ;
DBMS_LOB.WRITE(l_clob, LENGTH(l_value), 1, l_value);
--commit;
END;
/