https://www.cnblogs.com/gered/p/10797012.html
示例
我的表:image_label_mapping_v5
mysql help表:mysql.help_topic b on b.help_topic_id
SELECT
a.tag, SUBSTRING_INDEX(SUBSTRING_INDEX(a.tag,'#', b.help_topic_id + 1), '#' , -1)
FROM image_label_mapping_v5 a
JOIN mysql.help_topic b on b.help_topic_id < (LENGTH(a.tag) - LENGTH(REPLACE(a.tag,'#','')) + 1)
WHERE type = 11;
网友评论