MySQL逗号分割字段的列转行
select a.id,substring_index(substring_index(a.val,',',b.help_topic_id+1),',',-1)
from
tbl_brand_attr_group a
join
mysql.help_topic b
on b.help_topic_id < (length(a.val) - length(replace(a.val,',',''))+1)
# 测试单条
and a.id='e0e00b82-e148-4918-8e5d-f167a5a8006d'
order by a.id;

浙公网安备 33010602011771号