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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger Question

Re: Trigger Question

From: Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk>
Date: Fri, 25 Jun 1999 12:43:38 +0100
Message-ID: <37736B69.1BE7AD48@spamme.ed.ac.uk>


If it's in the database you want to do it use an after insert trigger on table A along the lines of:
update tableb set countfield = (select count(*) from tableA where criteria...)

Ashwin wrote:

> Hi all !
>
> Here's the situation....
>
> I have two tables (table A and table B). Whenever a row in tableA is
> inserted,
> I need to get the count of the rows(based on a criteria) in table A and
> update table B. This needs to be done automatically.
> Using views doesn't help.
>
> Has any one come across a similar situation ?
>
> Any help is greatly appreciated.
>
> Thanks,
> Ashwin
Received on Fri Jun 25 1999 - 06:43:38 CDT

Original text of this message

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