title: Set a value if null inserted in Oracle SQL
body: <p>I have created a trigger, that will automatically set the first column values as subsequent factorial numbers. However, additionally, I would like to set the second column's value as the value of first incremented by 5, in case a null value is inserted. Here's what I try right now:</p>
  
  <pre><code>create or replace trigger test_tr
  before insert on myT
  for each row 
  begin
  
  IF :new.mNumb is null 
  THEN       
      UPDATE myT
      SET mNumb = :new.tab_id + 5;
  END IF;
  
  
  SELECT fac(test_seq.NEXTVAL)
  INTO   :new.tab_id
  FROM   dual;
  
  
  end;
  </code></pre>
  
  <p>But clearly I'm missing something, as nothing happens, the inserted null is still empty.</p>