Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Fine point of Triggers on fields and OR conditions

Fine point of Triggers on fields and OR conditions

From: <dba_222_at_yahoo.com>
Date: 25 May 2006 16:27:53 -0700
Message-ID: <1148599673.885698.276010@y43g2000cwc.googlegroups.com>


Dear experts,

I've been asked to write some triggers in Oracle.

Traditionally, I have used standard SQL. Or functions and procedures.
So I don't dream in trigger code.

I'm wondering about specifying fields in the trigger.

Take this example from Oracle docs.

CREATE TRIGGER hr.salary_check

   BEFORE INSERT OR UPDATE OF salary, job_id

        ON hr.employees
   FOR EACH ROW
....

This lists:
Before UPDATE OF salary, job_id

Does this mean that if EITHER of SALARY, or JOB_ID is updated, the trigger will fire. (OR condition)

Or, does it mean that BOTH must be updated (AND condition)

???

Thanks a lot Received on Thu May 25 2006 - 18:27:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US