Re: Master-detail locking problem
From: Frank <franjoe_at_frisurf.no>
Date: Mon, 12 Mar 2001 21:41:56 +0100
Message-ID: <XAar6.4103$tR1.44962_at_news1.oke.nextra.no>
Date: Mon, 12 Mar 2001 21:41:56 +0100
Message-ID: <XAar6.4103$tR1.44962_at_news1.oke.nextra.no>
Hi!
I guess that Oracle assumes that you may update any of the columns of the table in the trigger, since you have not added a FOR UPDATE OF kol1, kol2, ... clause in the CREATE statement of the trigger.
Try the following trigger:
CREATE OR REPLACE TRIGGER m_BR_TRG
before INSERT or UPDATE
OF a
ON m /*!!!!!!!!!!*/
for each row
declare
begin
dbms_output.put_line(NVL(TO_CHAR(:new.a), 'NULL'));
if :new.a is null then
SELECT m_seq.NEXTVAL into :new.a FROM dual;
end if;
end;
/
Frank Received on Mon Mar 12 2001 - 21:41:56 CET