Re: How to update a table from inside a trigger

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Fri, 29 Aug 2003 16:37:52 +0200
Message-ID: <p7pukvoopta0m7et2t4l10o9lqr4ueof7b_at_4ax.com>


On Fri, 29 Aug 2003 15:00:44 +0200, "Markus Hoss" <ho_at_gruen-ag.de> wrote:

>Hi folks
>
>i´ve got a problem. I use a "After Insert trigger" to copy data from table1
>into table2. Now I would like to update the time and date of the process in
>my trigger table. Is there any mechanism to change values during a trigger
>or can I define a chain of triggers to apply the update?
>
>Best regards
>Markus
>

If you want to update values in the table the trigger is firing on you need to do that 'before insert for each row' and you can simply assign :new.<column> := <any value>

As documented of course

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Fri Aug 29 2003 - 16:37:52 CEST

Original text of this message