Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What does a trigger know?
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.
I thought about doing something like this a while ago myself but I gave up as there doesn't appear a trigger can pick that info up. The only pre-defined global variables are the :new and :old in a "before" triggers.
Johnny Chan
Independent Oracle Specialist
Received on Fri May 16 1997 - 00:00:00 CDT
![]() |
![]() |