| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> LOB with trigger
My question is about lobs within trigger.
I have to create triggers on insert/update/delete on tables in order
to perform specific auditing.
For regular column type,it is ok.
But for blob column type, i do not have a good lob locator in the :new
variable.
ex:
create table bb (id number,name varchar2(10),obj blob);
create table bbaudit(id number,action char(1),timest date,name
varchar2(10),obj blob);
create trigger TG_BB_UI
BEFORE INSERT OR UPDATE on BB
FOR EACH ROW
DECLARE
sAction CHAR(1);
BEGIN
IF INSERTING THEN
sAction:='I';
ELSIF UPDATING THEN
sAction:='U';
END IF;
insert into bbaudit (ID,ACTION,TIMEST,NAME,OBJ)
values (:new.id,sAction,sysdate,:new.name,:new.OBJ);
END;
According to Oracle, trigger does not support LOBs.
In regular trigger :old reference can be read but not written AND :new
reference cannot be read nor written.
Someone does have an idea about how to resolve this restriction. Received on Sun Dec 26 2004 - 12:24:16 CST
![]() |
![]() |