title: Copy value from table to another if not like 0
body: <p>what Im trying to do is copy value between 2 tables only if value webId from table domains is different than 0. This is giving me error:</p>
  
  <pre><code>BEGIN
  
  SET new.referralWebId=domains.webId if webId from domains where webId not like '0';
  
  END IF;
  
  END
  </code></pre>
  
  <p>This is for a BEFORE INSERT statement in customers table.
  Does anyone have a solution?
  Thank you in advance.</p>