title: From comma separated list to individual item result set. *mysql
body: <p>I'm doing some data migration from a horribly designed database to a less horribly designed database. There is a many to many relationship that has a primary key in one table that corresponds to a comma separated list in another.</p>
  
  <pre><code>FK_ID | data
  -------------
  1,2   | foo
  3     | bar
  1,3,2 | blarg
  </code></pre>
  
  <p>Is there a way to output the FK_ID field with each comma separated element as a single line in the result set?</p>
  
  <pre><code>result set
  FK_ID | data
  -------------
  1     | foo
  2     | foo
  3     | bar
  1     | blarg
  2     | blarg
  3     | blarg
  </code></pre>
  
  <p>I'm thinking this would require some sort of recursive query which I don't think mysql has.</p>
  
  <p>Thanks in advance.</p>