title: MySQL syntax error except it doesn't look like that
body: <p>My question is about this query:</p>
  <pre><code>select x2.c from x2 
  left join x1
  join x3 
  on x1.a=x2.c and x3.b=x2.d;
  </code></pre>
  <p>which is returning the 'Error Code 1064' (&quot;You have an error in you SQL syntax(...)&quot;).</p>
  <p>At first, it was &quot;select x2.*(...)&quot;. So, since I wanted a LEFT JOIN from x2, I thought maybe selecting all followed by that left join was causing the error, but it wasn't the case.</p>
  <p>Also, removing 'left' from 'left join' eliminates the error, so</p>
  <pre><code>select x2.c from x2 
  join x1 
  join x3 
  on x1.a=x2.c and x3.b=x2.d;
  </code></pre>
  <p>works fine.</p>
  <p>So, probably three questions here:</p>
  <ol>
  <li>What could be causing this error?</li>
  <li>Why is it returning a syntax error?</li>
  <li>How can a join type cause a syntax error?</li>
  </ol>
  <p>TABLES:</p>
  <pre><code>CREATE TABLE x1 (A int);
  insert into x1 value (1);
  insert into x1 value (2);
  insert into x1 value (3);
  insert into x1 value (4);
  insert into x1 value (5);
  
  CREATE TABLE x2 (C int, D int);
  insert into x2 values (1,1);
  insert into x2 values (1,3);
  insert into x2 values (1,5);
  insert into x2 values (2,1);
  insert into x2 values (2,3);
  insert into x2 values (3,1);
  insert into x2 values (3,1);
  
  CREATE TABLE x3 (B int);
  insert into x3 value (1);
  insert into x3 value (2);
  insert into x3 value (3);
  </code></pre>