title: trigger if else
body: <p>I have a trigger that verifies if a field is null:</p>
  
  <pre><code>create or replace trigger trig1
  after insert on table_1
  for each row
  begin
  if ((select table2.column2 from table2 where table2.id= :new.id) isnull) then
  update table2 set table2.column2 = :new.column1 where table2.id = :new.id;
  end if;
  end trig1;
  .
  run;
  </code></pre>
  
  <p>I get an error that the trigger is created with compilation errors. I don't know what the problem is. I use Oracle SQL*Plus 10.2.0</p>