代码语言:sql复制
SELECT
SUBSTRING_INDEX( SUBSTRING_INDEX( '7654,7698,7782,7788', ',', help_topic_id 1 ), ',',- 1 )
AS num
FROM
mysql.help_topic
WHERE
help_topic_id < LENGTH( '7654,7698,7782,7788' )- LENGTH(
REPLACE ( '7654,7698,7782,7788', ',', '' )) 1