title: Inner/Outer join issue in MySQL
body: <p>I have 2 tables orders and customers with data as:</p>
  
  <pre><code>mysql&gt; select * from orders;
  +---------+----------------+----------+-------+
  | orderid | product        | customer | price |
  +---------+----------------+----------+-------+
  |     292 | sofa           |      101 |  6000 |
  |     293 | table          |      105 |  3000 |
  |     294 | table          |      104 |  1450 |
  |     295 | table          |      101 |  1200 |
  |     296 | chair          |      103 |   800 |
  |     297 | dressing table |      104 |  9000 |
  |     298 | corner         |      102 |  1000 |
  |     299 | corner         |      102 |   900 |
  |     300 | bed            |     NULL |  NULL |
  |     301 | door           |     NULL |  NULL |
  +---------+----------------+----------+-------+
  10 rows in set (0.00 sec)
  
  
  mysql&gt; select * from customers;
  +--------+----------+-----------+
  | custid | name     | location  |
  +--------+----------+-----------+
  |    101 | jaspreet | New delhi |
  |    102 | harpreet | Jalandhr  |
  |    103 | surjit   | Amritsar  |
  |    104 | harneet  | ludhiana  |
  |    105 | hashar   | New Delhi |
  |    106 | harneet  | NULL      |
  +--------+----------+-----------+
  6 rows in set (0.00 sec)
  </code></pre>
  
  <p>When i run inner join, it return the following data:</p>
  
  <pre><code>mysql&gt; select orders.orderid,customers.name from orders inner join customers where orders.customer=customers.custid;
  +---------+----------+
  | orderid | name     |
  +---------+----------+
  |     292 | jaspreet |
  |     295 | jaspreet |
  |     298 | harpreet |
  |     299 | harpreet |
  |     296 | surjit   |
  |     294 | harneet  |
  |     297 | harneet  |
  |     293 | hashar   |
  +---------+----------+
  8 rows in set (0.00 sec)
  </code></pre>
  
  <p>But the outer joins are not working on this. </p>
  
  <pre><code>mysql&gt; select orders.orderid,customers.name from orders left join customers where orders.customer=customers.custid;
  </code></pre>
  
  <blockquote>
    <p>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 n ear 'where orders.customer=customers.custid' at line 1</p>
  </blockquote>
  
  <p>Can someone help me with this concept?</p>
  
  <p>Thanks in advance</p>