title: MySQL AFTER INSERT Trigger - select INTO using NEW values not working
body: <p>In MySQL: </p>
  
  <ol>
  <li>I have an <code>interview</code> table, and </li>
  <li>when a new interview is created (a row inserted into <code>interview</code>), </li>
  <li>I want to add rows to a child table <code>interview_questions</code> table linking to the question definitions in <code>interview_questions_template</code>.</li>
  </ol>
  
  <p>I'm trying to do this in an AFTER INSERT trigger on <code>interview</code>, and mysql is saying I have a syntax error at the end of my INSERT INTO ... SELECT statement.</p>
  
  <p>I've tried joining with NEW, thinking it might be a table, but that didn't work either. Gander at the code?</p>
  
  <pre><code>CREATE TRIGGER interview_AFTER_INSERT AFTER INSERT ON interview 
  FOR EACH ROW
  BEGIN
    INSERT INTO interview_questions (id_interview, id_candidate, id_question_def,  s_userid)
      SELECT NEW.id_interview, NEW.id_candidate, interview_question_template.id_question_def, NEW.s_userid 
          FROM interview_question_template;
  
  END
  </code></pre>
  
  <p>The error mysqlworkbench is showing is "missing 'semicolon'", underlining interview_question_template after the FROM.</p>
  
  <p>The execution error says there is an error on that line after ' '.</p>