title: Mysql split string (column) into new rows by delimiter
body: <p>I have the following string <strong>156,12,99,12,14,17</strong> sometimes this is longer and/ or shorter and involves letters and numbers e.g cc,21,366,ddd.</p>
  
  <p>The ideal output would be 
  <a href="https://i.stack.imgur.com/PG9c5.png" rel="nofollow noreferrer">output</a>:</p>
  
  <p><img src="https://i.stack.imgur.com/PG9c5.png" alt="output"></p>
  
  <p>I have this which gives me the number of delimits in the column:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select
  LENGTH(a.column) - LENGTH(REPLACE(a.column, ',', '')) + 1 AS numberofdelimit
  FROM &lt;mydatabase&gt;.&lt;mytable&gt; as a
  where a.id = 4;
  </code></pre>
  
  <p>I also know that this code will give me the text at which delimit: </p>
  
  <pre><code>SUBSTRING_INDEX(a.column, ',', numbers.n)
  </code></pre>
  
  <p>I'm struggling to put it together to put the values into new rows.</p>