1) Row level trigger - An event is triggered for each row upated, inserted or deleted.
2) Statement level trigger - An event is triggered for each sql statement executed.
We can create a trigger to update the 'product_price_history' table when the price of the product is updated in the 'product' table.
The order of the execution of these triggers is undeterministic (or random, if you want this word) except that all before triggers fire before the after triggers.MERGE is what is known as a deterministic statement.That is, you can only update the same row of the target table once in the same MERGE statement.For Example: The price of a product changes constantly.It is important to maintain the history of the prices of the products.Hi all, I have a serious problem: 1/ create table mm (a int, b int, c int); 2/ create or replace trigger t_mm after update of b on mm referencing old as old new as new for each row declare i int; j int; pragma autonomous_transaction; begin i := ld.b; j := :new.b; if i j then update mm set c = 2 where a = :new.a ; end if; end; 3/ insert into mm (a, b) values (1, 1); 4/ update mm set b= 2 where a =1 when I run step 4, it raise an error : Ora-00060: deadlock detected while waiting for resouce Ora-06512: at "t_mm" line 10 Ora-04088:error during execution of trigger "t_mm" what is the problem? thanks in advanced Thi Nguyen Oh, now I see the real problem, it's your autonomous transaction.