Triggers in Oracle
How can I use Trigger in Oracle 10g
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 10, 2011, 8:24 PM EDT
I have Experience in Sql server only, but i think the concept of using triggers are same for all databases. you may try this E-Book:
Click Here
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 10, 2011, 11:19 PM EDT
You can look at our recommended articles at the right for more information and articles on Trigger in Oracle. Following is a small example:
CREATE OR REPLACE TRIGGER tableChangesTrigger
BEFORE DELETE OR INSERT OR UPDATE ON MyTable
FOR EACH ROW
WHEN (new.col1 > 0) -- This is condition to start trigger processing, you can check for key value here
DECLARE
mvar number;
BEGIN
mvar := :new.col1 - :old.col1; -- :new. will give new values and :old. will give old values
dbms_output.put('Old value: ' || :old.col1);
END;
Please do not forget to mark "Accepted Answer".