mysql字符串拆分

SELECT  SUBSTRING_INDEX(SUBSTRING_INDEX(a.path,',',b.help_topic_id + 1),',',-1) as path

FROM

(SELECT industrys as path FROM zc_project) a

JOIN 

mysql.help_topic b 

ON b.help_topic_id < (LENGTH(a.path)- LENGTH(REPLACE(a.path,',','')) + 1);

posted @ 2021-12-23 11:40  Aoul  阅读(217)  评论(0编辑  收藏  举报