title: Trigger to monitor is value acceptable or not
body: <p>I have Oracle 11g and a table called CODES and there is column ID and CODESA as follow:</p>
  
  <pre><code>ID  CODESA
  1   9999
  1   8889
  2   77777
  2   99999
  3   1234
  3   4321
  4   565656
  etc.
  </code></pre>
  
  <p>Then I need to update another table CODES2 and column CODESB based on ID in CODES table</p>
  
  <p>I need a trigger to monitor this.</p>
  
  <p>Let´s say I monitoring ID = 2 with this trigger and all different CODESA´s under that ID,
  you can see that only these are possible to update in CODESB</p>
  
  <pre><code>2   77777
  2   99999
  </code></pre>
  
  <p>How to make a trigger to launch if user is trying to enter some code in CODESB
  which is for example from ID = 3 ?</p>
  
  <p>Appreciate your help. Thanks,</p>
  
  <p>Some_user</p>