开发者社区 问答 正文

mysql分割字符串怎么分呢 百度不行啊

有个表 id和generation_relationship两个字段 id为主键 generation_relationship是主键拼接的字符串 类似 1-2-3

我从百度的方法执行 select substring_index(substring_index(a.generation_relationship,'-',b.help_topic_id+1),'-',-1) from t_newera_customerinfo a join mysql.help_topic b on b.help_topic_id < (length(a.generation_relationship) - length(replace(a.generation_relationship,'-','')) + 1);

结果为空

求帮忙
1-2-3
转成 1 2 3 image.png

展开
收起
社区秘书 2019-11-18 13:58:47 908 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 一样的问题~解决了吗

    2021-04-22 15:53:49 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论