#实现方式
select
substring_index(substring_index(s.ParamValue, ',', b.help_topic_id + 1), ',', -1)
from
sysparam s
join mysql.help_topic b on
b.help_topic_id < (length(s.ParamValue) - length(replace(s.ParamValue, ',', '')) + 1)
where
s.ParamId = 228
#实现原理
select
s.ParamValue,
length(s.ParamValue),
length(replace(s.ParamValue, ',', '')) + 1,
(length(s.ParamValue) - length(replace(s.ParamValue, ',', '')) + 1),
substring_index(s.ParamValue, ',', b.help_topic_id + 1),
b.help_topic_id,
substring_index(substring_index(s.ParamValue, ',', b.help_topic_id + 1), ',', -1)
from
sysparam s
join mysql.help_topic b on
b.help_topic_id < (length(s.ParamValue) - length(replace(s.ParamValue, ',', '')) + 1)
where
s.ParamId = '228'