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