title: How to loop a column data with comma separator using MYSQL
body: <pre><code>id | value
  
  1  | 0, 1
  
  2  | 0,1,2
  </code></pre>
  
  <p><strong><code>table_1</code></strong></p>
  
  <ol>
  <li><p>I have a table known as <strong>table_1</strong> which have <strong>id</strong> and <strong>value</strong> column.</p></li>
  <li><p>I would like to loop through the <strong>value</strong> column for each data which is seperated with comma.  </p></li>
  <li><p>Then, I would like to insert the every data into a new table.</p></li>
  </ol>
  
  <p>As below:</p>
  
  <pre><code>id | value
  
  1  | 0
  
  1  | 1
  
  2  | 0
  
  2  | 1
  
  2  | 2
  </code></pre>
  
  <p><strong><code>table_2</code></strong></p>
  
  <ol>
  <li><p>This means that in table_2, it will have two rows of when user_id=1.</p></li>
  <li><p>Example: user_id = 1, value = 0
          user_id =1, value = 1</p></li>
  </ol>
  
  <p>How to achieve this? Your response is very much appreciated. </p>