数据库表bim_section_management中path中存储的值为 a.b.c.d 的字符串形式,以 . 分割,实现查询具体的sql以下:mysql
select
DISTINCT substring_index( substring_index(t1.path,'.',t2.help_topic_id + 1), '.' ,-1 )
from bim_section_management t1 join mysql.help_topic t2 on t2.help_topic_id < (length(t1.path) - length(REPLACE(t1.path,'.','')) + 1 )sql
若是复用只须要替换加粗部分代码便可。该方法须要明确a,b,c,d字符长度均相同一致才会分割生效,有必定局限性。数据库