oracle 觸發器寫法(1)
CREATE OR REPLACE TRIGGER IMA_UPD
AFTER UPDATE
ON table_a REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
BEGIN
if :New.a NOT LIKE '3%' AND (:Old.b <> :New.b or :Old.b <> :New.b) then
INSERT INTO ds4.a(c, vv, bb)
VALUES (:New.a1, 1, SYSDATE);
end if;
EXCEPTION
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END IMA_UPD;