Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What does a trigger know?

Re: What does a trigger know?

From: Michael Carmack <mcarmack_at_freenet.columbus.oh.us>
Date: 1997/05/15
Message-ID: <5lffoc$cle@login.freenet.columbus.oh.us>#1/1

You can query USER_TRIGGERS to find out what table a trigger belongs to, e.g. SELECT TABLE_NAME FROM USER_TRIGGERS WHERE TRIGGER_NAME = 'MYTRIGGER';

Brian Gastineau (bgastine_at_giveblood.org) wrote:
: Does a trigger have information on how it was envoked? For example, is
: there a global variable (or other method) which tells a trigger which table
: caused it to fire? Alternately, if the trigger knows its own name, I think
: that a data dictionary table could be queried to get the table name. This
: is all the information I need in the trigger now, but if other information
: (example: insert, update, delete operation) is available in the same place,
: I could see using that also.
 

: My motivation for this question is to make a generic PL/SQL procedure which
: is called from triggers on multiple tables. The processing accomplished
: would depend on the table firing the trigger. I would prefer not to
: hard-code the table name as a parameter to avoid manually verifying that
: the table names in the trigger match the firing table.
 

: Thanks,
: Brian Gastineau
: bgastine_at_giveblood.org

-- 
========================================================================
"Villains, I say to you now:       |   Mike Carmack
 KNOCK OFF ALL THAT EVIL!"         |   Vulcan Dragon -==(UDIC)==-
    S P O O N !!!!    - The Tick   |   mcarmack_at_freenet.columbus.oh.us
Received on Thu May 15 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US