1.使用到数据库自带的mysql.help_topic表来属性拆分,help_topic表就是实现行转列功能
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(a.path,’,’,b.help_topic_id + 1),’,’,-1) as path,a.name
FROM
(select type as path , name from aaa) a
JOIN
mysql.help_topic b
ON b.help_topic_id < (LENGTH(a.path) - LENGTH(REPLACE(a.path,’,’,’’)) + 1);