MySQL把以逗号分隔的字符串转换成行
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);结果:
转载
2020-08-24 11:38:51 ·
1706 阅读 ·
0 评论