Re: Database TRIGGER

From: Elisa Cotrina <ecotrina_at_ts.es>
Date: 1996/07/24
Message-ID: <31F6731A.167E_at_ts.es>#1/1


Hovorka Dieter wrote:
>
> hallo world,
>
> who can tell me how to make a database trigger. for example i want to
> write a action off any update,insert to a log table.
>
> it would be helpful if anyone got an idea on this.
>
> thanks for your help
> dieter
> --
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> |
> |/
> | ~ ~ ~ ~ ~ ~ Zytec GesmbH
> |/
> | ( . . ) ( x x ) ( . . ) HOVORKA Dieter
> |/
> | | | x | x Breitenfurterstrasse 251
> |/
> | xxx \_/ \_/ A - 1231 Vienna / AUSTRIA
> |/
> | Tel.: ++43 1 80 150 - 548
> |/
> | e-mail: hovorka _at_ zytecvie.co.at
> |/
> \________________________________________________________________________|/

For create a trigger you can see the examples that you have at PL/SQL User Guide and Reference section 4 page 41, and at Application Developper's Guide section 8.

It is only a PL/SQL program that you call TRIGGER:

CREATE TRIGGER name

   BEFORE(AFTER) INSERT OR UPDATE OR DELETE OF fields ON table    FOR EACH ROW
   WHEN ....
DECLARE
    ....
BEGIN
    ...

But if you like to have a log, it is easier to put some TRACE's and AUDIT's.

Greattings:

                   Elisa
Received on Wed Jul 24 1996 - 00:00:00 CEST

Original text of this message