set @rownum=0;
SELECT
@rownum:= @rownum +1 AS 序号,
a.id,
a.username,
SUBSTRING_INDEX(SUBSTRING_INDEX(a.tags, ',', b.help_topic_id + 1), ',',-1) AS tag
FROM
`testmysql_hangzhuanlie` AS a
JOIN mysql.help_topic AS b
ON b.help_topic_id < ( length( a.tags ) - length( REPLACE ( a.tags, ',', '' ) ) + 1 )
SELECT
@rownum:= @rownum +1 AS 序号,
a.id,
a.username,
SUBSTRING_INDEX(SUBSTRING_INDEX(a.tags, ',', b.help_topic_id + 1), ',',-1) AS tag
FROM
`testmysql_hangzhuanlie` AS a
JOIN mysql.help_topic AS b
ON b.help_topic_id < ( length( a.tags ) - length( REPLACE ( a.tags, ',', '' ) ) + 1 ),(SELECT @rownum:=10) r