mysql sql语句通过某一字段使用某一字符将一行分为多行

select substring_index(substring_index(substr(a.users,2,(length(a.users) - 2)),’,’,(b.help_topic_id + 1)),’,’,-(1)) AS USER from (表名 a join mysql.help_topic b on((b.help_topic_id < ((length(substr(a.users,2,(length(a.users) - 2))) - length(replace(substr(a.users,2,(length(a.users) - 2)),’,’,’’))) + 1))))

你可能感兴趣的:(mysql)