title: mysql split string
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1096679/can-mysql-split-a-column">Can Mysql Split a column?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a single row with 1 column in mysql that has data in the form of 'Dave=>Anderson, Mick=>Jagger, Foxxy=>Brown'. Is there a way in mysql to split the string &amp; iterate through each split &amp; then subsequently format the data? </p>
  
  <p>I have the following:</p>
  
  <pre><code>SELECT SUBSTRING_INDEX(  `names` ,  ',', 1 ) AS mynames FROM  `table` 
  </code></pre>
  
  <p>This will obviously give me just 'Dave=>Anderson' and not the rest of the names. </p>
  
  <p>(I realize I can do this in PHP but wanted to know if this can be done in mysql)</p>
  
  <p>UPDATE: 
  I should be clearer: I would like to return a separate row for each of the names:</p>
  
  <pre><code>    +-----------------+
      | mynames         |
      +-----------------+
      | Dave Anderson   |
      +-----------------+
      | Mick Jagger     |
      +-----------------+
      | Foxxy Brown     |
      +-----------------+
  </code></pre>