【发布时间】:2012-04-13 17:46:51
【问题描述】:
我需要有关在我的 table1 上创建触发器的帮助,该触发器会将特定列从 table1 插入到 table2。我怎样才能做到这一点?我正在使用 Oracle 11G XE。
这是我的代码:
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;
如果他们更新ex_bulacan 中的数据怎么办?也会自动更改我的allowance 表吗?
【问题讨论】:
-
更新时不会改变,因为你的触发器只有
after insert
标签: sql oracle11g oracle-apex plsqldeveloper