银河的水好冷丶 2017-01-07 14:32 采纳率: 100%
浏览 1493
已采纳

mysql 拆分A表字段存到临时表

mysql 拆分A表字段存到临时表

现有表 tba
tba

求拆分成tbb
tbb

  • 写回答

3条回答 默认 最新

  • Mr-Yao 2017-01-07 16:01
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?