MySQL将一个字段中以逗号分隔的取出来形成新的字段实现
1例如:要把如图1的字段拆分图2 select account_id, substring_index(substring_index(a.related_shop_ids,',' ,b.help_topic_id+1),',',-1) shopid from sales_hang_account a join mysql.help_topic b on b.help_topic_id < (length(a.related_shop_ids) - length(replace(a.related_shop_ids,',','')
下载地址
用户评论