Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PRAGMA AUTONOMOUS_TRANSACTION in a trigger
I am heading down the track of using PRAGMA AUTONOMOUS TRANSACTION in
a BEFORE INSERT OR UPDATE trigger to avoid mutating table errors. The
trigger needs to, among other things, sum up the values of a certain
column of the table on which the trigger is sitting.
By declaring the trigger like:
Does this then allow the trigger to select from the table it is on (XBLDG_GR)? Also, will declaring the trigger like this mean that I will be able to RAISE_APPLICATION_ERROR in the trigger with the intention of rolling back anything the trigger has done AND the actual insert/updated that fired the trigger?
Thanks in advance - I cannot work this out myself because I don't have an Oracle database on my machine to test my code until next week - and I am new to Oracle.
Josh. Received on Sun Apr 03 2005 - 22:56:38 CDT
![]() |
![]() |