Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Get the table name in a trigger
I believe the question is answered with dynamic SQL.
The dynamic SQL package (dbms_sql ) allows for the construction of any
query at runtime. Assuming that rest of the information / data is consistent
one
can transfer in the table name at runtime, construct the sql statement, parse
and
execute it.
This is all in the programming manual.
Mike Krolewski
Matthew, MacFarland wrote:
> Hello everyone,
>
> Is there a way to get the name of the table that a trigger is defined on
> from within the trigger code at run time?
>
> Each of the triggers in the application I am working on calls a procedure
> which takes the table name as a parameter and I am trying to find a way to
> avoid hard coding the table names in all the triggers.
>
> Thanks,
>
> Matthew MacFarland
> Dril-Quip, Inc.
Received on Tue Aug 25 1998 - 00:00:00 CDT
![]() |
![]() |