title: IF syntax error
body: <p>I'm getting a syntax error while following the MySQL guide for <code>IF</code> syntax.</p>
  
  <p>My query is:</p>
  
  <pre><code>if 0=0 then select 'hello world'; end if;
  </code></pre>
  
  <p>Logically, this should select <code>'hello world'</code>, but instead I get</p>
  
  <pre><code>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if (0=0) then select 'hello world'' at line 1
  ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end if' at line 1
  </code></pre>