Re: trigger synchronization

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Fri, 28 Nov 2003 11:33:38 -0500
Message-ID: <DLOdnai6vs2c5FqiRVn-jg_at_comcast.com>



found it... here's the syntax for an autonomous transaction in a trigger from the PL/SQL guide:

CREATE TRIGGER parts_trigger
BEFORE INSERT ON parts FOR EACH ROW
DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
    INSERT INTO parts_log VALUES(:new.pnum, :new.pname);     COMMIT; -- allowed only in autonomous triggers END; "mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote in message news:...
| (didn't see the original post)
|
| trigger code is executed within the same transaction as the DML that fires
| the trigger, unless an autonomous transaction is used (don't remember if
| this can be done directly in a trigger or if a procedure has to be called,
| but i think i remember doing in the trigger)
|
| -- mark stock
|
| "M Hamilton" <mhamilton_at_usgs.gov> wrote in message
| news:7ce65461.0311280807.34bb298d_at_posting.google.com...
| | Hi Sergio,
| | I may not be thinking clearly today (since I ate so much turkey
| | yesterday), but... I don't understand what you are asking about in
| | your post. Would you mind rephrasing it?
| | Thanks
| | Margaret
| |
| | smeligr_at_supereva.it (Sergio) wrote in message
| news:<93d21777.0311280130.921e8f6_at_posting.google.com>...
| | > I have a trigger that ago a insert in one table.
| | >
| | > The execution of the trigger is transaction?
| | > thanks
| | > Sergio
|
|
Received on Fri Nov 28 2003 - 17:33:38 CET

Original text of this message