Create ORACLE TRIGGER which (INSERT OR UPDATE) in TABLE1 whenever a new INSERT is done in TABLE2
Try something like this. It also accounts for situations in which &quot;id&quot; didn't previously exist. Note: I used &quot;concat_col&quot; as the &quot;concat&quot; column name; @nbk is right - you shouldn't have column names that match pre-defined function names.
CREATE OR REPLACE TRIGGER TRIGGER1 
AFTER INSERT ON TABLE1 
REFERENCING OLD AS OLD NEW AS NEW 
FOR EACH ROW
BEGIN
   merge into table2
   using (select :new.id l_id from dual) d on (table2.id = d.l_id)
   when matched then   
      update set concat_col = concat_col || ' ' || :new.name || '=' || :new.value
   when not matched then
      insert (id, concat_col) values (:new.id, :new.name || '=' || :new.value);
END;
/