shows an illegal use of LOBs in a trigger. : Trigger Error « Trigger « Oracle PL / SQL






shows an illegal use of LOBs in a trigger.

 
SQL>
SQL> CREATE TABLE lobdemo (
  2    key NUMBER,
  3    clob_col CLOB,
  4    blob_col BLOB);

Table created.

SQL>
SQL> CREATE OR REPLACE TRIGGER LOBTrigger
  2    BEFORE UPDATE ON lobdemo
  3    FOR EACH ROW
  4  DECLARE
  5    v_InitialString VARCHAR2(50) :=
  6      'LOBTrigger: ';
  7  BEGIN
 10    DBMS_LOB.WRITE(:new.clob_col, LENGTH(v_InitialString),
 11                   1, v_InitialString);
 12  END LOBTrigger;
 13  /

Trigger created.

SQL> drop table lobdemo;

Table dropped.

SQL>
SQL>

 








Related examples in the same category

1.This trigger will raise an ORA-4091 mutating table error.