title: mySQL query to update each record with combined value from all
body: <p>We have two tables (comment, and comment_tags) as following:</p>
  
  <pre><code>mysql&gt; describe comment;
  +--------------+--------------+------+-----+---------+-------+
  | Field        | Type         | Null | Key | Default | Extra |
  +--------------+--------------+------+-----+---------+-------+
  | id           | int(11)      | YES  |     | NULL    |       |
  | blogpost_id  | int(11)      | YES  |     | NULL    |       |
  | comment_text | varchar(256) | YES  |     | NULL    |       |
  +--------------+--------------+------+-----+---------+-------+
  
  mysql&gt; describe comment_tags;
  +------------+-------------+------+-----+---------+-------+
  | Field      | Type        | Null | Key | Default | Extra |
  +------------+-------------+------+-----+---------+-------+
  | comment_id | int(11)     | YES  |     | NULL    |       |
  | tag        | varchar(80) | YES  |     | NULL    |       |
  +------------+-------------+------+-----+---------+-------+
  </code></pre>
  
  <p>Each comment could have different tags associated with it. Now we want to propagate all comment tags to all comments for same blogpost. So essentially we want to make all comment_tags the same for all comments on each blogpost. </p>
  
  <p>I know we can write a script or PL/SQL to do this. But I am wondering if there a single mySQL query that can do this. </p>
  
  <p>Is it possible to have a single mySQL query that propagates all tags on comments to all comments of the same blog post?</p>