Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there a Database event that occurs when a row is inserted/updated in a table?
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