不需要自建自增的辅助表,Mysql自带help_topic可以使用;
SELECT SUBSTRING_INDEX( SUBSTRING_INDEX( target_column, ‘,‘, b.help_topic_id + 1 ), ‘,‘, -1 ) AS coop_branch FROM survey_draft AS a JOIN mysql.help_topic AS b ON b.help_topic_id < ( length( a.target_column ) - length( REPLACE ( a.target_column, ‘,‘, ‘‘ ) ) + 1 )