title: Syntax Error with MySql Workbench and IF Statement
body: <p>I'm migrating from T-SQL to MySql syntax and don't know how to get over this syntax error given by Workbench 5.1.18:</p>
  
  <pre><code>-- --------------------------------------------------------------------------------
  -- Routine DDL
  -- --------------------------------------------------------------------------------
  DELIMITER //
  
  CREATE PROCEDURE `SysTicket`.`GetProductionLines` (aId INT, aActive INT, aResponsible VARCHAR(8000))
  BEGIN
      IF(aId &gt; 0) THEN SELECT * FROM ProductionLine WHERE Id = @Id;
  
      ELSE IF( aActive &lt;&gt; -1 AND aResponsible = '|$EMPTYARG$|') THEN SELECT * FROM ProductionLine;
  
      ELSE IF(aResponsible = '|$EMPTYARG&amp;|') THEN SELECT * FROM ProductionLine WHERE Active = aActive;
  
      ELSE SELECT * FROM ProductionLine WHERE Active = aActive AND Responsible LIKE CONCAT('%', aResponsible, '%');
  
      END IF;    
  END//
  </code></pre>
  
  <p>It says Syntax error near END (last line)
  ty in advance.</p>