title: MySQL Trigger syntax error unexpected end of input
body: <p>this is the query that i am using</p>
  
  <pre><code>create trigger trig1 after insert on participant for each row
  begin
  insert into team(sap) select sap from participant order by ID desc limit 1,1
  end;
  </code></pre>
  
  <p>it is supposed to copy the sap field from the participant table into the sap field of the team table after a new row is inserted into the participant table
  the engine shows me an unexpected end of input error at the end of "end"</p>
  
  <p>i've  tried numerous methods to rework the query but i keep getting the same error
  what am i doing wrong?</p>
  
  <p>thanks</p>