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: After Update Trigger

Re: After Update Trigger

From: Mikail Dellovich <foo_at_foo.com>
Date: Sun, 19 Nov 2006 22:24:10 -0500
Message-ID: <12m27ut9jqtf085@news.supernews.com>


DA Morgan wrote:
> Mikail Dellovich wrote:

>> How may I setup a trigger  on a table being updated to update another 
>> table based on the current table being updated with out getting the 
>> mutating table error. Is there a non row after update trigger for the 
>> whole table the triggers after all the rows are updated?
>>
>> Thanks

>
> By posting your database version (the rules are version specific)
> By posting your trigger code so we can see what you are trying to do
> By posting the actual error message you are receiving

Database: 10gr2

I will give you an example:

table a
(

    col1 varchar2(20),
    col2 number(20)
)

table b
(

    col1 varchar2(20),
    col2 number(20)
)

procedure a(lvcol)
{

select sum(col2) into lvsum from table a where col1=lvcol;

update table b col2=lvsum where col1=lvcol; }

I want to call procedure a everytime table a is updated or inserted.

Thanks Received on Sun Nov 19 2006 - 21:24:10 CST

Original text of this message

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