- GROUP_CONCAT
- mysql.help_topic
select GROUP_CONCAT(id) as ids from test
# 4488,4489,4490,4491,4492,4493,4494
SET @ids = '4488,4489,4490,4491,4492,4493,4494';
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@ids, ',', ht.help_topic_id + 1), ',', -1) as id FROM mysql.help_topic ht
WHERE ht.help_topic_id < (LENGTH(@ids) - LENGTH(REPLACE(@ids, ',', '')) + 1);
标签:GROUP,help,ids,topic,id,CONCAT
From: https://www.cnblogs.com/wufengsheng/p/16712254.html