Jag skulle använda FIND_IN_SET(str,strlist)
:
select distinct t1.id
from table1 t1
join table2 t2 on find_in_set(t2.type, t1.name) > 0
Arbetsexempel:http://sqlfiddle.com/#!2/b642c/4
Jag skulle använda FIND_IN_SET(str,strlist)
:
select distinct t1.id
from table1 t1
join table2 t2 on find_in_set(t2.type, t1.name) > 0
Arbetsexempel:http://sqlfiddle.com/#!2/b642c/4