举例:

id value
1 1,2,3,4
2 2,3,4,5,6

拆分成:

id value
1 1
2 2
3 3
4 4
5 5
6 6
select distinct substring_index(substring_index(a.value,',',b.help_topic_id+1),',',-1)
from table a join mysql.help_topic b on b.help_topic_id < (length(a.value) - length(replace(a.value,',',''))+1)

distinct:去重复操作

a.value:表别名.需要拆分的字段名

table a:表名 别名

help_topic:自增长表

最新文章

  1. [ios]关于用FMDB 操作数据库 删除 tableView 后刷新
  2. Java之流程控制语句
  3. Spring中Bean的生命周期方法
  4. xml对象的序列化和反序列化
  5. JS&amp;CSS文件请求合并及压缩处理研究(四)
  6. Codeforces Round #143 (Div. 2) E. Cactus 无向图缩环+LCA
  7. framebuff 显示子系统
  8. halcon的算子列表
  9. OpenMeetings(3)----启动顺序解析
  10. MYSQL while 、repeat
  11. Linux网络管理之net-tools VS iproute2
  12. 空指针错误 java.lang.NullPointerException
  13. 求m区间内的最小值
  14. 管理Mac的Python环境
  15. HashMap和Hashtable的异同点
  16. java Api 读取HDFS文件内容
  17. Vue-详解设置路由导航的两种方法: &lt;router-link :to=&quot;...&quot;&gt; 和router.push(...)
  18. bzoj 3295 动态逆序对 (三维偏序,CDQ+树状数组)
  19. DHCP协议和PXE
  20. hdu 3836 Equivalent Sets trajan缩点

热门文章

  1. ML- 线性回归推导
  2. linux/unix发行清单
  3. Django 之 cookie &amp; session
  4. 从SQLAlchemy的“缓存”问题说起
  5. 自定义微信小程序swiper轮播图面板指示点的样式
  6. git分布式版本控制系统的概述和安装
  7. Maven 报错:Compilation of Maven projects is supported only if external build is started from an IDE.
  8. 五个wordpress调用随机文章的方法
  9. cf1158A-The Party and Sweets - (贪心+思维)
  10. LeetCode 953. Verifying an Alien Dictionary