select substring_index(substring_index(a.unit_proj_type,',', b.help_topic_id + 1), ',', -1) as unit_proj_type from ucas_unit_proj a
JOIN mysql.help_topic b
ON b.help_topic_id < (LENGTH(a.unit_proj_type) - LENGTH(REPLACE(a.unit_proj_type, ',', '')) + 1 )
where a.unit_proj_type is not null
MySQL 将字符串根据逗号分隔,拆分为多条记录
猜你喜欢
转载自blog.csdn.net/zhouzhiwengang/article/details/103809269
今日推荐
周排行