I need help on creating a trigger on my table1
that will insert specific columns into table2
from table1
. How can I do that? I am using Oracle 11G XE .
Here is my code:
create or replace trigger AllowanceTrigger
after insert on ex_bulacan
for each row
begin
insert into allowance (PLANT_ORIGIN,SO_NO, SO_STATUS,SO_REMARKS,DRIVER_NAME)
values (:new.plant_origin, :new.sales_order_no, :new.status,:new.remarks, :new.driver_name);
end;
What if they update the data in ex_bulacan
? Will automatically change my allowance
table as well?