title: MySQL-extract IDs from column and search for matching rows
body: <p>table 1 has two columns: <code>ID</code> and <code>details</code>. in the details column there is a string in this format:</p>
  <pre><code>ID1:code1,ID2:code2,...
  for example:
  ABC:110,ERTL:780,POV:555
  </code></pre>
  <p>now I need to extract the IDs mentioned in <code>details</code> column and search the table for rows with matching IDs:</p>
  <pre><code>SELECT * FROM table1 WHERE ID IN (&lt;the IDs mentioned in the details column of first row&gt;)
  </code></pre>
  <p>how to run such query in MySQL 8?</p>