select distinct substring_index( substring_index( a.需要拆分的字段名, ',', b.help_topic_id + 1 ), ',',- 1 ) name from 表名 a join mysql.help_topic b ON b.help_topic_id < ( length( a.需要拆分的字段名 ) - length( replace( a.需要拆分的字段名, ',', '' ) ) + 1 )
mysql.help_topic:mysql自增id的表,如果没有可以自己建一个表
help_topic_id :自增id的表的主键 如果是自己建的表如上图则为id
注意:自己新建的表的id的数量一定要比需要拆分的字段的逗号的个数多