Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Master-detail locking problem
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 - 14:41:56 CST
![]() |
![]() |