创建触发器
CREATE OR REPLACE TRIGGER "time_test_TR"
AFTER INSERT OR UPDATE OR DELETE ON TIME_TEST
FOR EACH ROW
BEGIN case
when inserting then
insert into TIME_TEST2
(id, val, ctime)
values
(:new.id, :new.val, :new.ctime);
when updating then
update TIME_TEST2
set val = :new.val,
ctime = :new.ctime
where id = :new.id;
when deleting then
delete TIME_TEST2 where id = :old.id;
end case;
END;
删除触发器
DROP TRIGGER "time_test_TR";
ALTER TRIGGER "time_test_TR" ENABLE;