title: MySQL: UPDATE with a JOIN and a GROUP_CONCAT
body: <p>Is this possible?</p>
  
  <p>I have 2 tables, Customers and Orders. Now I want to fill a column in Customers with all order id's of that customer (comma separated).  </p>
  
  <p>I tried something like this, but it doesnt work:</p>
  
  <pre><code>UPDATE customers AS c
  LEFT JOIN orders AS o ON o.customerid=c.customerid
  SET c.orders = GROUP_CONCAT(DISTINCT o.orderid)
  </code></pre>
  
  <p>I get 'Invalid use of group function'.</p>
  
  <p>PS. I know it's better to always dynamically get the GROUP_CONCAT values in a SELECT/JOIN, but I'm just wondering if I can fill this column in some way.</p>