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: Is there a Database event that occurs when a row is inserted/updated in a table?

Re: Is there a Database event that occurs when a row is inserted/updated in a table?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 05 Feb 2004 07:58:46 -0800
Message-ID: <1075996672.297461@yasure>


Jack Wright wrote:

> Dear All,
> We have developed an client-server application that uses Oracle 8i
> as a backend. All our tables have a field <CheckID> that needs to have
> a value on insert/update. Is there a database event that can track
> which in table a row is being inserted and appened <checkID> to it. I
> do not want to write a trigger for every table.
>
> Please help
>
> TALIA
> Many Regards
> Jack

Use a trigger in this form:

CREATE OR REPLACE TRIGGER <trigger_name> BEFORE INSERT OR UPDATE
ON <table_name>
FOR EACH ROW DECLARE <variable declarations>

BEGIN
    <code>
EXCEPTION
    <exception handlers>
END <trigger_name>;
/

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Feb 05 2004 - 09:58:46 CST

Original text of this message

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