Hi lists,

DB:Oracle 8i

I need to write a db trigger on table T1. It has to update T2 when ever
T1 is updated.
(Both T1 and T2 tables have identical structure.)

The following query is doing wrong update.

can anybody tell me what is wrong in this code:

create or replace trigger trg_on_T1
before update on T1
for each row
begin
if updating then
update T2
set     a=:new.a,
        b=:new.b,
        c=:new.c;
                        -- how to add the where clause..?
end if;
end trg_on_T1;


I dont know how to use where clause in this. b'coz all columns can be
updated by users.

Can anybody give any hints.

Thnx in advance

Srinivas
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Tatireddy, Shrinivas (MED, Keane)
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to