mysql 拆分A表字段存到临时表
现有表 tba
求拆分成tbb
SELECT t.id as id, substring_index(substring_index(t.str,',', b.help_topic_id + 1), ',', -1) as str
FROM tba t join mysql.help_topic b ON b.help_topic_id < (LENGTH(t.str) - LENGTH(REPLACE(t.str, ',', '')) + 1);
参考:http://blog.csdn.net/ldl22847/article/details/47609727