需要拆分的数据
SQL
#config_value为需要拆分的字段
SELECT @rownum := @rownum + 1,
config_id,
SUBSTRING_INDEX(SUBSTRING_INDEX(config_value, ',', T2.help_topic_id + 1), ',', - 1)
FROM (SELECT @rownum := 0) t,
`sys_config` T1
JOIN mysql.help_topic T2
ON T2.help_topic_id < (LENGTH(config_value) - LENGTH(REPLACE(config_value, ',', '')) + 1)
;