MySQL巧妙利用help_topic表把以逗号分隔的字符串转换成行_hfsaini的专栏-CSDN博客

MySQL巧妙利用help_topic表把以逗号分隔的字符串转换成行

脚本:

select substring_index(substring_index('82,83,84,85,86',',',help_topic_id+1),',',-1) as Id from mysql.help_topic where help_topic_id<(length('82,83,84,85,86')-length(replace('82,83,84,85,86',',',''))+1);

结果:


Original url: Access
Created at: 2020-10-13 10:42:30
Category: default
Tags: none

请先后发表评论
  • 最新评论
  • 总共0条评论