参考https://www.jb51.net/article/231782.htm
SELECT
substring_index(substring_index('1,2,3,4',',', b.help_topic_id + 1), ',', -1) result
FROM
mysql.help_topic b
where
b.help_topic_id < (LENGTH('1,2,3,4') - LENGTH(REPLACE('1,2,3,4', ',', '')) + 1);
例子:
例子








网友评论